Skip to content

Conversation

jacobguenther
Copy link
Contributor

For 2533

Implement a function gl.DrawWaterReflections which is available to unsynced lua. It essentially replicates how IWater::DrawReflections and CBumpWater::DrawReflection create reflections. It expects the caller to setup an fbo before calling it.

I have a minimal example widget here showing how to use it and for testing.

@jacobguenther
Copy link
Contributor Author

It might be better to expose the water reflection texture as $water_reflection/LUATEX_WATER_REFLECTION. And then add a function to enable/disable generating it gl.EnableWaterReflectionTexture(boolean/options...)? But then in the unlikely event that multiple widgets/gadgets want to use it they would be stepping on each other's settings.

@jacobguenther jacobguenther marked this pull request as ready for review August 18, 2025 09:54
@jacobguenther
Copy link
Contributor Author

Or if anybody has ideas on how to achieve the same effect with what is already available I am all ears

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

Successfully merging this pull request may close these issues.

1 participant