Inconsistent layout in aomap_fragment
include, compared to i.e. roughnessmap_fragment
#28617
Labels
Milestone
aomap_fragment
include, compared to i.e. roughnessmap_fragment
#28617
Description
I want to modify he occlusion value using my own custom logic. But the
ambientOcclusion
variable is defined very late on the shader.I think the aomap_fragment.js file could be simplified like below:
Solution
In case of
USE_AOMAP
being false, the multiplication by 1.0 for the extra operations should be insignificant.As for
computeSpecularOcclusion
, I don't know where that would go.Alternatives
I store temp variable early on, and modify the aomap_fragment chunk in a messy way.
Additional context
I am using this tool: https://ycw.github.io/three-shaderlib-skim/dist/#/latest/standard/fragment
The text was updated successfully, but these errors were encountered: