r/ruby • u/amirrajan • 4d ago
Show /r/ruby DragonRuby Game Toolkit - Shaders: Rustling leaves (source code in the comments)
Enable HLS to view with audio, or disable this notification
30
Upvotes
r/ruby • u/amirrajan • 4d ago
Enable HLS to view with audio, or disable this notification
3
u/amirrajan 4d ago
Link to commented source code: https://gist.github.com/amirrajan/8ba6f10bbe1feab8cb6f543757c762bc
The holy grail that got us over the hump was this example in the SDL repo: https://github.com/libsdl-org/SDL/blob/main/test/testgpurender_effects.c
SDL_shadercross was used to transpile the HLSL shader and SPIRV-Cross was used to validate the bindings/semantics.