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

2d noise graphics object #68

Open
aconstlink opened this issue Mar 7, 2024 · 1 comment
Open

2d noise graphics object #68

aconstlink opened this issue Mar 7, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@aconstlink
Copy link
Owner

A very nice feature would be to produce a noise texture in the backend with some default values but also with an opportunity for the user to change parameters.

First we might need a new graphics object: noise2d_object_t
That new object is producing a 2d noise texture on the gpu and is accessible through the texture name if required via a variable in the shader.

Updating that texture could be done through a new update function in the backend.
void_t update( noise2d_object_mtr_t ) ;

Or the run-time can somehow change variable changes.

@aconstlink aconstlink added the enhancement New feature or request label Mar 7, 2024
@aconstlink aconstlink self-assigned this Mar 7, 2024
@aconstlink aconstlink changed the title 2d noise texture graphics object 2d noise graphics object Mar 7, 2024
@aconstlink
Copy link
Owner Author

aconstlink commented Apr 2, 2024

At the moment, it is possible to create a noise texture on the cpu and use that in the shader via a texture lookup.

For this issue, it might make sense to introduce a new shader variable type and being able to access it through some new functions:

// in the msl shader
noise2d_t noise_lut ;
... 
noise( vec2_t(), noise_lut ) ;

The advantage of this method is clearly the ability to generate the noise texture itself on the GPU transparently to the user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant