Graphics/BasicMaterial: Improve shader
This commit is contained in:
parent
81b64e4fe2
commit
1b4ab7e625
|
|
@ -62,7 +62,7 @@ fn main(input: FragIn) -> FragOut
|
|||
|
||||
const if (HAS_ALPHA_TEXTURE)
|
||||
// TODO: diffuseColor.w *= MaterialAlphaMap.Sample(input.uv)).x
|
||||
diffuseColor = vec4<f32>(diffuseColor.x, diffuseColor.y, diffuseColor.z, (MaterialAlphaMap.Sample(input.uv)).x * diffuseColor.w);
|
||||
diffuseColor = vec4<f32>(diffuseColor.x, diffuseColor.y, diffuseColor.z, MaterialAlphaMap.Sample(input.uv).x * diffuseColor.w);
|
||||
|
||||
const if (ALPHA_TEST)
|
||||
{
|
||||
|
|
@ -92,7 +92,7 @@ struct VertOut
|
|||
fn main(input: VertIn) -> VertOut
|
||||
{
|
||||
let output: VertOut;
|
||||
output.position = viewerData.projectionMatrix * viewerData.viewMatrix * instanceData.worldMatrix * vec4<f32>(input.pos, 1.0);
|
||||
output.position = viewerData.viewProjMatrix * instanceData.worldMatrix * vec4<f32>(input.pos, 1.0);
|
||||
|
||||
const if (HasUV)
|
||||
output.uv = input.uv;
|
||||
|
|
|
|||
Loading…
Reference in New Issue