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

Transparent material flag, systematic material regeneration issue? #23

Closed
cjcliffe opened this issue Sep 16, 2011 · 5 comments

Comments

@cjcliffe
Copy link
Owner

commented Sep 16, 2011

Currently to change the opacity of a material it must initially start at something less than 1.0, such as opacity 0.999, if the opacity is changed the shader does not adapt to support it. This will require a flag check or bitmask to re-initialize the shader when alpha conditions have changed.

This however might attest to a more systematic problem of the lack of a material 'dirty' flag. The ideal here might be to add a general flag to the material to force it to flush it's pool cache and regenerate or reassign on the next draw.

@ghost ghost assigned cjcliffe Sep 16, 2011

@CloudScorpion

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2011

I am interested tackling this issue, I have had a fair bit of experience in the last couple years with graphical programming (though mostly in DirectX) and I believe I can implement the functionality you desire here.

@cjcliffe

This comment has been minimized.

Copy link
Owner Author

commented Sep 28, 2011

sure, it should mostly just involve adding a function to the Material that will clear out it's local copy of the shaders from the global pool -- that should cause them to rebuild.

more interestingly the transparency and blending setup is mostly untested for correctness -- if you want to try and make use of transparencies in various conditions and find the issues there that would certainly help.

@ghost ghost assigned humphd Sep 28, 2011

@cjcliffe

This comment has been minimized.

Copy link
Owner Author

commented Sep 29, 2011

@CloudScorpion if you're familiar with shaders and materials you may also be interested in #30

@CloudScorpion

This comment has been minimized.

Copy link
Contributor

commented Sep 30, 2011

OK I'll look into it, thanks.

@cjcliffe

This comment has been minimized.

Copy link
Owner Author

commented Nov 17, 2011

looks like this is working well; only issue I noted was against the skybox -- but that's a different issue altogether I believe. thanks!

@cjcliffe cjcliffe closed this Nov 17, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.