N8python / n8ao

An efficient and visually pleasing implementation of SSAO with an emphasis on temporal stability and artist control.
Creative Commons Zero v1.0 Universal
378 stars 14 forks source link

v167 Deprecates LinearTosRGB #29

Closed ashconnell closed 4 months ago

ashconnell commented 4 months ago

Running N8AO with Three 167 results in the following error:

THREE.WebGLProgram: Shader Error 0 - VALIDATE_STATUS false

Material Name: 
Material Type: ShaderMaterial

Program Info Log: Fragment shader is not compiled.

FRAGMENT

ERROR: 0:369: 'LinearTosRGB' : no matching overloaded function found
ERROR: 0:369: '=' : dimension mismatch
ERROR: 0:369: 'assign' : cannot convert from 'const mediump float' to 'out highp 4-component vector of float'

  364:         }
  365: #ifdef DITHERING
  366:  gl_FragColor.rgb = dithering( gl_FragColor.rgb );
  367: #endif
  368:         if (gammaCorrection) {
> 369:             gl_FragColor = LinearTosRGB(gl_FragColor);
  370:         }
  371:     }
  372:   

This is because 167 removed the deprecated LinearTosRGB shader function.

It was removed here: https://github.com/mrdoob/three.js/commit/132f25879f58cbc27ef432499a54eb89c5da7e40

I'm not sure what the best fix for this is but hoping I saved you some time hunting down why :)

N8python commented 4 months ago

Will push a fix as soon as possible.

N8python commented 4 months ago

Fixed as of: n8ao@1.8.3