VDTM material

This commit is contained in:
Nick Fisher
2025-03-25 14:54:30 +08:00
parent cac063324d
commit e8169e86d1

View File

@@ -9,6 +9,10 @@ material {
{
type : float3[3],
name : cameraPositions
},
{
type : bool,
name : flipUVs
}
],
variables : [
@@ -19,7 +23,8 @@ material {
],
requires : [ position, uv0 ],
shadingModel : unlit,
doubleSided : true,
doubleSided : false,
interpolation: flat,
blending: opaque,
depthWrite : true,
depthCulling : true,
@@ -70,6 +75,9 @@ fragment {
float z = (weights.x * 0.0) + (weights.y * 0.5) + (weights.z * 1.0);
vec2 uv = getUV0();
if(materialParams.flipUVs) {
uv = uvToRenderTargetUV(uv);
}
vec3 texCoord = vec3(uv, z);
material.baseColor = texture(materialParams_perspectives, texCoord);
}