mirror of
https://github.com/godotengine/godot.git
synced 2024-11-27 09:16:35 +08:00
Merge pull request #17421 from Chaosus/fixshaderbugs
Fix few bugs in shader definitions
This commit is contained in:
commit
8a5fb669ae
@ -872,9 +872,9 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() {
|
||||
actions[VS::SHADER_PARTICLES].renames["EMISSION_TRANSFORM"] = "emission_transform";
|
||||
actions[VS::SHADER_PARTICLES].renames["RANDOM_SEED"] = "random_seed";
|
||||
|
||||
actions[VS::SHADER_SPATIAL].render_mode_defines["disable_force"] = "#define DISABLE_FORCE\n";
|
||||
actions[VS::SHADER_SPATIAL].render_mode_defines["disable_velocity"] = "#define DISABLE_VELOCITY\n";
|
||||
actions[VS::SHADER_SPATIAL].render_mode_defines["keep_data"] = "#define ENABLE_KEEP_DATA\n";
|
||||
actions[VS::SHADER_PARTICLES].render_mode_defines["disable_force"] = "#define DISABLE_FORCE\n";
|
||||
actions[VS::SHADER_PARTICLES].render_mode_defines["disable_velocity"] = "#define DISABLE_VELOCITY\n";
|
||||
actions[VS::SHADER_PARTICLES].render_mode_defines["keep_data"] = "#define ENABLE_KEEP_DATA\n";
|
||||
|
||||
vertex_name = "vertex";
|
||||
fragment_name = "fragment";
|
||||
|
@ -218,9 +218,8 @@ ShaderTypes::ShaderTypes() {
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_HEIGHT"] = ShaderLanguage::TYPE_FLOAT;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_COLOR"] = ShaderLanguage::TYPE_VEC4;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_UV"] = ShaderLanguage::TYPE_VEC2;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT_SHADOW"] = ShaderLanguage::TYPE_VEC4;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["LIGHT"] = ShaderLanguage::TYPE_VEC4;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SHADOW"] = ShaderLanguage::TYPE_VEC4;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["SHADOW_COLOR"] = ShaderLanguage::TYPE_VEC4;
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["POINT_COORD"] = constt(ShaderLanguage::TYPE_VEC2);
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].built_ins["TIME"] = constt(ShaderLanguage::TYPE_FLOAT);
|
||||
shader_modes[VS::SHADER_CANVAS_ITEM].functions["light"].can_discard = true;
|
||||
@ -254,7 +253,6 @@ ShaderTypes::ShaderTypes() {
|
||||
shader_modes[VS::SHADER_PARTICLES].functions["vertex"].built_ins["RANDOM_SEED"] = constt(ShaderLanguage::TYPE_UINT);
|
||||
shader_modes[VS::SHADER_PARTICLES].functions["vertex"].can_discard = false;
|
||||
|
||||
shader_modes[VS::SHADER_PARTICLES].modes.insert("billboard");
|
||||
shader_modes[VS::SHADER_PARTICLES].modes.insert("disable_force");
|
||||
shader_modes[VS::SHADER_PARTICLES].modes.insert("disable_velocity");
|
||||
shader_modes[VS::SHADER_PARTICLES].modes.insert("keep_data");
|
||||
|
Loading…
Reference in New Issue
Block a user