XOR Userforum
Vertex Shaders - Printable Version

+- XOR Userforum (https://forum.xor.eu)
+-- Forum: Products (https://forum.xor.eu/forumdisplay.php?fid=3)
+--- Forum: NerdSEQ (https://forum.xor.eu/forumdisplay.php?fid=6)
+---- Forum: General Questions (https://forum.xor.eu/forumdisplay.php?fid=17)
+---- Thread: Vertex Shaders (/showthread.php?tid=2031)



Vertex Shaders - TheSandbag - 11-22-2025

I'm trying to do a bit of optimisation by moving per frame constanst into the vertex shader but having some issues. Is it possible to have the default vertex shader (and is attributes) posted in the manual?


RE: Vertex Shaders - XORadmin - 11-22-2025

(11-22-2025, 02:01 PM)TheSandbag Wrote: I'm trying to do a bit of optimisation by moving per frame constanst into the vertex shader but having some issues. Is it possible to have the default vertex shader (and is attributes) posted in the manual?

I will post the original vertex shader later on.
You can also use your own vertex shader. Just use the same filename with .vert and it will be used automatically.


RE: Vertex Shaders - TheSandbag - 11-22-2025

So I was mostly wanting to know what the inbound attributes where to the vertex shader otherwise it just breaks. Figured out a_position for the vertex position so can use that to feed gl_position


RE: Vertex Shaders - XORadmin - 11-23-2025

Code:
attribute vec2 a_position; void main() { gl_Position = vec4(a_position, 0.0, 1.0); }