Graphics/BasicMaterial: Improve shader
This commit is contained in:
@@ -62,7 +62,7 @@ fn main(input: FragIn) -> FragOut
|
|||||||
|
|
||||||
const if (HAS_ALPHA_TEXTURE)
|
const if (HAS_ALPHA_TEXTURE)
|
||||||
// TODO: diffuseColor.w *= MaterialAlphaMap.Sample(input.uv)).x
|
// 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)
|
const if (ALPHA_TEST)
|
||||||
{
|
{
|
||||||
@@ -92,7 +92,7 @@ struct VertOut
|
|||||||
fn main(input: VertIn) -> VertOut
|
fn main(input: VertIn) -> VertOut
|
||||||
{
|
{
|
||||||
let output: 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)
|
const if (HasUV)
|
||||||
output.uv = input.uv;
|
output.uv = input.uv;
|
||||||
|
|||||||
Reference in New Issue
Block a user