-
Notifications
You must be signed in to change notification settings - Fork 8
DropShadowShader
Grisgram edited this page Oct 4, 2025
·
3 revisions
Another simple but lightning fast shader to create drop shadows of any object.
It takes one uniform argument:
__u_shadow_alpha = shader_get_uniform(DropShadowShader, "u_vShadowAlpha");This shader is meant to be used to draw with an offset (it's not a surface shader, so it doesn't render the object with offset by itself, instead it renders the object as shadow.
This example code shows how the Window object of raptor draws its drop shadow:
if (drop_shadow_visible) {
shader_set(DropShadowShader);
shader_set_uniform_f(__u_shadow_alpha, drop_shadow_alpha);
x += drop_shadow_xdistance;
y += drop_shadow_ydistance;
draw_self();
x -= drop_shadow_xdistance;
y -= drop_shadow_ydistance;
shader_reset();
draw_self();
}Raptor free: Animation ● StateMachine ● Files(Sync) ● Macros ● Logger ● Controllers ● LG Localization ● Particle Effects ● Tools, other Objects and Helpers
Raptor pro: RACE (The Random Content Engine) ● Savegame System ● UI Subsystem ● Shaders ● Files(Async) ● RichJson ● Scriptor
Back to Repo ● Wiki Home ● Copyright © coldrock.games
- Home
- Working with raptor
- Create a Game
- raptor's object model
- Macros
- Logger
- Controllers
- StateMachine
- Animation
- Particle Effects
- LG Localization
- Interfaces
- Tools, other Objects and Helpers
Raptor Pro Modules