Closed Dawie3565 closed 6 months ago
more Updates requested by Cristain
TerrainDrawInstancedHelper.cs ---- BIRP Only ----
Line 128
/ 0 - tex coords/"\t{0} = float4( (patchVertex.xy * uvscale.zw + uvoffset.zw), 0, 0 );\n",
change to
/ 0 - tex coords/"\t{0} = float4(sampleCoords, 0, 0 );\n",
Fixed TerrainDrawInstancedHelper.cs instanced terrain code generation for BIRP Template Only TerrainDrawInstancedHelper.zip
Thanks for the contribution @BOXOPHOBIC !
This is now fixed in v1.9.4 (previously v1.9.3.4)
re open as not closed yet
tested in HDRP 12x 2021.3.38
when enable option for Instance terrain ase is still adding:
this condition results is duplication and also ASE is adding the incorrect instancing option for terrain
Fixed "forwardadd" being added to HDRP and URP. It's not used by Unity's URP/HDRP terrain shaders.
Everything else is pretty much a duplication problem, not specifically related only to "Instanced Terrain". I've created a new issue to address these problems => #305
Closing this issue.
HDRP Instanced Terrain option is adding: --- #pragma multi_compile_instancing --- #pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap forwardadd
this behavior is different than BIRP and URP it should not add pragma for instancing
///////////////// Note it is also adding the incorrect one for terrain, use incorrect instancing can result is errors within some unity versions for LOD cross fade sharing the same constant buffers.
pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap forwardadd
for terrain should be
pragma instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap
//////////////
please make behavior same as BIRP and URP and do not add instancing pragma
Note within terrain we only add the below in defined passes
instancing_options assumeuniformscaling nomatrices nolightprobe nolightmap Forward, GBuffer
multi_compile_instancing Forward,GBuffer,ShadowCaster,DepthOnly,DepthNormals