mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fix highp precision in shaders & Implement WebGL::GetShaderPrecisionFormat
This commit is contained in:
parent
7f825d2119
commit
6b0c898e1a
7 changed files with 31 additions and 346 deletions
|
@ -106,9 +106,11 @@ impl WebGLShader {
|
|||
}
|
||||
|
||||
if let Some(ref source) = *self.source.borrow() {
|
||||
let mut params = BuiltInResources::default();
|
||||
params.FragmentPrecisionHigh = 1;
|
||||
let validator = ShaderValidator::for_webgl(self.gl_type,
|
||||
SHADER_OUTPUT_FORMAT,
|
||||
&BuiltInResources::default()).unwrap();
|
||||
¶ms).unwrap();
|
||||
match validator.compile_and_translate(&[source]) {
|
||||
Ok(translated_source) => {
|
||||
debug!("Shader translated: {}", translated_source);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue