From 7da02c8708c53768777d8a0db64a393dea4b156e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Thu, 15 Apr 2021 15:01:58 +0200 Subject: [PATCH] Fix RenderTest shader code --- examples/RenderTest/main.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/examples/RenderTest/main.cpp b/examples/RenderTest/main.cpp index 5dcde7161..b3b19ebcc 100644 --- a/examples/RenderTest/main.cpp +++ b/examples/RenderTest/main.cpp @@ -9,7 +9,7 @@ #include const char shaderSource[] = R"( -[[layout(std140)]] +[layout(std140)] struct Data { projectionMatrix: mat4, @@ -19,30 +19,30 @@ struct Data external { - [[binding(0)]] viewerData: uniform, - [[binding(1)]] tex: sampler2D + [binding(0)] viewerData: uniform, + [binding(1)] tex: sampler2D } struct VertIn { - [[location(0)]] position: vec3, - [[location(1)]] normal: vec3, - [[location(2)]] uv: vec2 + [location(0)] position: vec3, + [location(1)] normal: vec3, + [location(2)] uv: vec2 } struct VertOut { - [[builtin(position)]] position: vec4, - [[location(0)]] normal: vec3, - [[location(1)]] uv: vec2 + [builtin(position)] position: vec4, + [location(0)] normal: vec3, + [location(1)] uv: vec2 } struct FragOut { - [[location(0)]] color: vec4 + [location(0)] color: vec4 } -[[entry(frag)]] +[entry(frag)] fn main(fragIn: VertOut) -> FragOut { let lightDir = vec3(0.0, -0.707, 0.707); @@ -54,7 +54,7 @@ fn main(fragIn: VertOut) -> FragOut return fragOut; } -[[entry(vert)]] +[entry(vert)] fn main(vertIn: VertIn) -> VertOut { let vertOut: VertOut;