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

Ring shader fixes and enhancements #206

Merged
merged 2 commits into from Aug 27, 2017

Conversation

HebaruSan
Copy link
Contributor

This patch makes the configuration of the "new shader" more consistent with the old shader, so old rings can be updated to use it without modification:

  • Use mesh's texture coordinates (fixes the problem where you have to rotate the textures to use the new shader, so the shaders can now share textures)
  • Obey color property (required for tinted rings as in the green JoolRings example)
  • Plus a few quality of life improvements like z-buffering and backface culling

Then a new concept of "inner shade" is added to the "thick" rings. This is a texture that can be used to cast independently mobile shadows on the inner face of a thick ring.

  • Property for the texture
  • Property specifying how many times it should be tiled
  • Property for its rotation period

After these changes, I'm able to configure a real-scale Ringworld complete with functional shadow squares:

newshader_and_shadowsquareshadows

- Only set sun radius once rather than every update
- NewShader: Use mesh's texture coordinates
- NewShader: Use material color
- NewShader: Enable z-buffer
- Rewrite shader compilation instructions
- NewShader: Cull back faces
- NewShader: Add innerShadeTexture property
- NewShader: Add innerShadeTiles property
- NewShader: Add innerShadeRotationPeriod property
- Add new type of shadow based on the inner shade texture properties
- Move sun radius set back to where it was
@StollD
Copy link
Member

StollD commented Aug 27, 2017

Looks like I didn't see this. Looks good, thank you!

@StollD StollD merged commit 5fe0521 into Kopernicus:master Aug 27, 2017
StollD pushed a commit that referenced this pull request Aug 27, 2017
@HebaruSan
Copy link
Contributor Author

Cool!
Just a quick note on this one, it does require the assets in Distribution/.../Shaders to be rebuilt using the shader-export project. I was not sure whether to include that in my commits or not; it might be considered to be part of packing a release. Either way, let me know; if you'd like new versions of these files, I can update them.

@StollD
Copy link
Member

StollD commented Aug 27, 2017 via email

@HebaruSan HebaruSan deleted the ring-shader-cleanup branch August 27, 2017 19:57
HebaruSan added a commit to HebaruSan/Kopernicus that referenced this pull request Aug 27, 2017
@HebaruSan
Copy link
Contributor Author

Sounds good, I submitted them in:
#210

StollD pushed a commit that referenced this pull request Aug 27, 2017
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.

None yet

2 participants