twigl
twigl copied to clipboard
doc: what are o0, o1, b1 ? ( and more )
compare to what I see in some demos, the doc ( readme here ) doesn't seem to be complete ! ;-) E.g. what are o0 and o1 ? What is b1 ? ( sounds like binding, but I don't see texture binding info in the app ).
Also, I see most people not initializing variables. Is the environment safely doing it, or will this break shaders on some systems as it does on Shadertoy ?
thanks !
@FabriceNeyret
Hi!
First of all, thank you for your interest in twigl. I am very, very happy.
The basic policy of twigl has always been simplicity. Therefore, it started out as an application with very limited functionality, but as the number of users increased, so did the number of requests, and after careful selection and implementation to meet some of the requests, it took the form it has today.
Colors output to o0
and o1
can be referenced in the next frame as b0
and b1
in sampler2D
. This is implemented using so-called MRT (Multiple Render Targets).
We apologize for not adding o0
and o1
to the documentation. We will consider adding them in the future.
There are also some other uniform variables that are not documented, such as sound
or s
, which takes sound from the sound shader as a floating point.
We will consider adding these as well.
Thank you!
yeah, would be very cool to have a complete doc ;-) This MRT is very cool, it deserves to be known !
Struggling trying to port one to shadertoy, somebody pointed be out that outputs are uchars, not floats, and thus clamped to 0,1. important information as well for the doc ;-)
@FabriceNeyret
I have included the recommendations in the README. Thank you so much!
https://github.com/doxas/twigl#advanced