comparison tests/test_vulkan_wrapper.nim @ 788:2d8a92171c9e

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 670ca93a358b
children 8d0ffcacc7e3
comparison
equal deleted inserted replaced
787:670ca93a358b 788:2d8a92171c9e
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)