internal: remove vertexScale from unlit material and multiply by alpha

This commit is contained in:
Nick Fisher
2025-01-02 13:16:42 +08:00
parent 242041c9f6
commit cc1b55b6c9
5 changed files with 31 additions and 197 deletions

View File

@@ -17,16 +17,12 @@ material {
{
type: float2,
name: uvScale
},
{
type: float,
name: vertexScale
}
],
depthWrite : true,
depthCulling : true,
shadingModel : unlit,
blending: opaque,
blending: transparent,
culling: none,
instanced: false,
vertexDomain: object,
@@ -36,6 +32,7 @@ fragment {
void material(inout MaterialInputs material) {
prepareMaterial(material);
material.baseColor = materialParams.baseColorFactor;
material.baseColor.rgb = material.baseColor.rgb * material.baseColor.a;
if (materialParams.baseColorIndex > -1) {
highp float2 uv = getUV0();
@@ -49,7 +46,6 @@ fragment {
vertex {
void materialVertex(inout MaterialVertexInputs material) {
float4 position = getPosition();
position.xyz *= materialParams.vertexScale;
material.worldPosition = getWorldFromModelMatrix() * position;
}
}