Closed LukasKalbertodt closed 8 years ago
Rendering a plain simple 1024x1024 shadow map halfes my FPS :persevere:
Fun fact: There's no way to use a sampler2DShadow
with glium. gg
How are we going to prevent the sun from shining into the side of caves at the outer chunk boundaries and lighting up parts of caves?
i looked for it a bit but i found nothing concerning lighting on chunk boarders with a fast google search.
So i can just give you my "experience" about that stuff.
in mc they seem to kinda avoid that issue by
the ideas i have don't seem to be in any way practical to solve this issue
After getting all that out my best "kinda solution" would be to
other than that i cant think of anything currently.
How are we going to prevent the sun from shining into the side of caves at the outer chunk boundaries and lighting up parts of caves?
Like @Cranc mentioned in (2.), this is unlikely to be a problem. It's important to note that Minecraft doesn't have shadows at all, but rather an occlusion based custom lighting system. Thus it's not really helpful to look at Minecraft in this regard.
I think we have more important issues to deal with :wink:
Fun fact: There's no way to use a sampler2DShadow with glium. gg
This, on the other hand, is a shame...
It's still possible to set the GL_TEXTURE_COMPARE_MODE
by calling the OpenGL function manually, but I'm not sure if we want that.
sampler2DShadow effectively just does PCF (right?), which I've implemented manually in the linked PR
Lukas Kalbertodt notifications@github.com schrieb am So., 31. Juli 2016, 23:44:
How are we going to prevent the sun from shining into the side of caves at the outer chunk boundaries and lighting up parts of caves?
Like @Cranc https://github.com/Cranc mentioned in (2.), this is unlikely to be a problem. It's important to note that Minecraft doesn't have shadows at all, but rather an occlusion based custom lighting system. Thus it's not really helpful to look at Minecraft in this regard.
I think we have more important issues to deal with 😉
Fun fact: There's no way to use a sampler2DShadow with glium. gg
This, on the other hand, is a shame... It's still possible to set the GL_TEXTURE_COMPARE_MODE by calling the OpenGL function manually, but I'm not sure if we want that.
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/OsnaCS/plantex/issues/108#issuecomment-236458547, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtCRr86t_Zj8LJ7AboIj6F7qF0SfMQdks5qbRc0gaJpZM4JWf_s .
Gruß, Jonas
sampler2DShadow effectively just does PCF (right?), which I've implemented manually in the linked PR
Correct, but sampler2DShadow
uses hardware acceleration. Your manual version fetches four values from the texture, while the shadow sampler only fetches one (of course, four values are read from the texture, but only one is transferred back to the shader). But I guess this is not worth worrying about right now.
Shadow looks fine for now. We could maybe improve performance still, but I will close this already.
I don't have time to explain this right now, but the basic task is clear: we need sun shadows.
First you should implement the basic algorithm, which is already hard enough.
Here are some names of algorithms to search for to improve the shadow quality: