Closed Boscop closed 5 years ago
If at some time you come to the realization that you also need the position information in the result, you just have to change the above code to:
struct Vertex { vec4 chdr_Position; vec3 position; vec4 color; };
Vertex map_vertex(vec3 position, vec4 color) { return Vertex(vec4(position, 1.), position, color); }
Why can't I just use `chdr_Position` in my fragment shader? Why do I have to add another `position` field?
Where can I find a full shader example with map_vertex and map_frag_data?
And how to write fragment depth?
Apart from these special functions and imports, does cheddar support everything that GLSL does? I'm asking because here you wrote: