Since switching to the CubicSurfaceExtractor from CubicSurfaceExtractorWithNormals
I have been having a lot of issues getting normals calculated through shaders.
I have searched every post in this forum and googled many variations of questions relating to this. No matter what I try shader wise I can't seem to get normals to calculate.
I am using vertex colouring instead of texturing each voxel and I need normals strictly for lighting.
So I should calculate the shaders like shown below in the _FP and then generate lighting before exiting the _FP?
Code:
float3 worldNormal = cross(ddy(inWorldPosition.xyz), ddx(inWorldPosition.xyz));
worldNormal = normalize(worldNormal);
Going to keep plugging away at it but I would appreciate any insight on what my pitfalls might be