overte icon indicating copy to clipboard operation
overte copied to clipboard

Simple shader used on shape entities has incorrect shading in Forward renderer

Open ada-tv opened this issue 8 months ago • 2 comments

Looks a bit like bad normals to me?

Test case

  • Sky and ambient color #808080, intensity 1.0
  • Sun color #ffffff, intensity 2.0
  • Cylinder shape with color #606060, both on the shape and on the material albedo color (though are rendered with different final colors?)

Example images

  • Simple shader, Forward Simple shader in the forward renderer
  • Simple shader, Deferred Simple shader in the deferred renderer
  • Material shader, Forward Material shader in the forward renderer
  • Material shader, Deferred Material shader in the deferred renderer

ada-tv avatar Apr 07 '25 08:04 ada-tv

I think this also affects the background of Text entities in forward rendering too

ada-tv avatar Apr 21 '25 17:04 ada-tv

regarding the difference for materials, I think it's probably an rbg/srgb difference (you can set whether or not a material color is srgb by passing a boolean as the 4th component to to the array: https://apidocs.overte.org/global.html#RGBS)

regarding the shading difference, that's definitely weird, since these two paths should be the same: https://github.com/overte-org/overte/blob/3aed07517a1c3ab3f1df9a1ac163ef2213678754/libraries/render-utils/src/simple.slf#L115-L142

I'm suspicious of the fresnel calculation, although that should match the deferred path

HifiExperiments avatar Apr 23 '25 06:04 HifiExperiments