Mercurial > games > semicongine
comparison tests/test_vulkan_wrapper.nim @ 327:a63bd8f29252
add: make same attribute for different shaders work correctly, yipie!
author | Sam <sam@basx.dev> |
---|---|
date | Fri, 25 Aug 2023 01:09:23 +0700 |
parents | 4ec852355750 |
children | 8d0ffcacc7e3 |
comparison
equal
deleted
inserted
replaced
326:4ec852355750 | 327:a63bd8f29252 |
---|---|
187 ], | 187 ], |
188 intermediates=[attr[Vec4f]("outcolor")], | 188 intermediates=[attr[Vec4f]("outcolor")], |
189 outputs=[attr[Vec4f]("color")], | 189 outputs=[attr[Vec4f]("color")], |
190 uniforms=[attr[Vec4f]("color")], | 190 uniforms=[attr[Vec4f]("color")], |
191 vertexCode="""gl_Position = vec4(position, 1.0) * transform; outcolor = Uniforms.color;""", | 191 vertexCode="""gl_Position = vec4(position, 1.0) * transform; outcolor = Uniforms.color;""", |
192 fragmentCode="color = vec4(0, 0, 1, 1);", | 192 fragmentCode="color = outcolor;", |
193 ) | 193 ) |
194 engine.initRenderer({ | 194 engine.initRenderer({ |
195 "my_material": shaderConfiguration1, | 195 "my_material": shaderConfiguration1, |
196 "my_special_material": shaderConfiguration2, | 196 "my_special_material": shaderConfiguration2, |
197 }.toTable) | 197 }.toTable) |