Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: what are o0, o1, b1 ? ( and more ) #48

Open
FabriceNeyret opened this issue Feb 11, 2023 · 4 comments
Open

doc: what are o0, o1, b1 ? ( and more ) #48

FabriceNeyret opened this issue Feb 11, 2023 · 4 comments

Comments

@FabriceNeyret
Copy link

FabriceNeyret commented Feb 11, 2023

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 FabriceNeyret changed the title doc: what are o0 and o1 ? ( and more ) doc: what are o0, o1, b1 ? ( and more ) Feb 11, 2023
@doxas
Copy link
Owner

doxas commented Feb 11, 2023

@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!

@FabriceNeyret
Copy link
Author

yeah, would be very cool to have a complete doc ;-)
This MRT is very cool, it deserves to be known !

@FabriceNeyret
Copy link
Author

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 ;-)

@doxas
Copy link
Owner

doxas commented Mar 13, 2023

@FabriceNeyret

I have included the recommendations in the README.
Thank you so much!

https://github.com/doxas/twigl#advanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants