-
Notifications
You must be signed in to change notification settings - Fork 63
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
Sokol shadows support #151
Sokol shadows support #151
Conversation
Also tile map shader for GeforceFX (https://github.com/KD-lab-Open-Source/Perimeter/blob/cmake/Source/Render/shader/GeforceFX/tile_map_scene.psh#L54) contains commented out PCF:
I think it was commented out because of performance but we could use it to get smooth shadows (https://learnopengl.com/Advanced-Lighting/Shadows/Shadow-Mapping). |
|
||
|
||
enum SOKOL_MATERIAL_TYPE { | ||
SOKOL_MAT_NONE = 0, | ||
SOKOL_MAT_LIGHT = 1, | ||
}; | ||
|
||
using pipeline_id_t = uint32_t; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Due to complexity of adding new pipeline types (and bit shifting) I decided to search pipeline by combination of parameters from context. I keep all pipelines in vector and since we don't expect to have a lot of pipelines, search should not be a problem.
2d03e1f
to
8ed928f
Compare
@@ -20,7 +20,7 @@ IF (OPTION_PROCESS_SHADERS) | |||
|
|||
if(NOT DEFINED ENV{PERIMETER_SHADER_LANG}) | |||
#Use all GLSL dialects, HLSL for D3d and WebGPU | |||
set(PERIMETER_SHADER_LANG "glsl410:glsl300es:hlsl5:wgsl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wsgl
does not support sampler2DShadow
but in Sokol examples they use Open GL ES for this:
if (FIPS_EMSCRIPTEN)
if (FIPS_EMSCRIPTEN_USE_WEBGPU)
set(sokol_backend SOKOL_WGPU)
set(slang "wgsl")
else()
set(sokol_backend SOKOL_GLES3)
set(slang "glsl300es")
endif()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, is fine since we dont use wgpu but good to remember in future in case is needed back
6f98763
to
e9f7c4f
Compare
82d7ccb
to
b5f28dc
Compare
No description provided.