mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 21:52:51 +00:00
Removes deleted OrenNayar mode from shaders and materials
This commit is contained in:
parent
711d4f3d86
commit
4daca0b580
@ -671,10 +671,7 @@
|
||||
<constant name="DIFFUSE_LAMBERT_WRAP" value="2" enum="DiffuseMode">
|
||||
Extends Lambert to cover more than 90 degrees when roughness increases.
|
||||
</constant>
|
||||
<constant name="DIFFUSE_OREN_NAYAR" value="3" enum="DiffuseMode">
|
||||
Attempts to use roughness to emulate microsurfacing.
|
||||
</constant>
|
||||
<constant name="DIFFUSE_TOON" value="4" enum="DiffuseMode">
|
||||
<constant name="DIFFUSE_TOON" value="3" enum="DiffuseMode">
|
||||
Uses a hard cut for lighting, with smoothing affected by roughness.
|
||||
</constant>
|
||||
<constant name="SPECULAR_SCHLICK_GGX" value="0" enum="SpecularMode">
|
||||
|
@ -505,9 +505,6 @@ void BaseMaterial3D::_update_shader() {
|
||||
case DIFFUSE_LAMBERT_WRAP:
|
||||
code += ",diffuse_lambert_wrap";
|
||||
break;
|
||||
case DIFFUSE_OREN_NAYAR:
|
||||
code += ",diffuse_oren_nayar";
|
||||
break;
|
||||
case DIFFUSE_TOON:
|
||||
code += ",diffuse_toon";
|
||||
break;
|
||||
@ -2400,7 +2397,7 @@ void BaseMaterial3D::_bind_methods() {
|
||||
|
||||
ADD_GROUP("Shading", "");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "shading_mode", PROPERTY_HINT_ENUM, "Unshaded,Per-Pixel,Per-Vertex"), "set_shading_mode", "get_shading_mode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "diffuse_mode", PROPERTY_HINT_ENUM, "Burley,Lambert,Lambert Wrap,Oren Nayar,Toon"), "set_diffuse_mode", "get_diffuse_mode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "diffuse_mode", PROPERTY_HINT_ENUM, "Burley,Lambert,Lambert Wrap,Toon"), "set_diffuse_mode", "get_diffuse_mode");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "specular_mode", PROPERTY_HINT_ENUM, "SchlickGGX,Blinn,Phong,Toon,Disabled"), "set_specular_mode", "get_specular_mode");
|
||||
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "disable_ambient_light"), "set_flag", "get_flag", FLAG_DISABLE_AMBIENT_LIGHT);
|
||||
|
||||
@ -2654,7 +2651,6 @@ void BaseMaterial3D::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(DIFFUSE_BURLEY);
|
||||
BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT);
|
||||
BIND_ENUM_CONSTANT(DIFFUSE_LAMBERT_WRAP);
|
||||
BIND_ENUM_CONSTANT(DIFFUSE_OREN_NAYAR);
|
||||
BIND_ENUM_CONSTANT(DIFFUSE_TOON);
|
||||
|
||||
BIND_ENUM_CONSTANT(SPECULAR_SCHLICK_GGX);
|
||||
|
@ -243,7 +243,6 @@ public:
|
||||
DIFFUSE_BURLEY,
|
||||
DIFFUSE_LAMBERT,
|
||||
DIFFUSE_LAMBERT_WRAP,
|
||||
DIFFUSE_OREN_NAYAR,
|
||||
DIFFUSE_TOON,
|
||||
DIFFUSE_MAX
|
||||
};
|
||||
|
@ -721,7 +721,6 @@ void SceneShaderForwardClustered::init(RendererStorageRD *p_storage, const Strin
|
||||
actions.render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
|
||||
}
|
||||
|
||||
actions.render_mode_defines["diffuse_oren_nayar"] = "#define DIFFUSE_OREN_NAYAR\n";
|
||||
actions.render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
|
||||
actions.render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
|
||||
|
||||
|
@ -737,7 +737,6 @@ void SceneShaderForwardMobile::init(RendererStorageRD *p_storage, const String p
|
||||
actions.render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
|
||||
}
|
||||
|
||||
actions.render_mode_defines["diffuse_oren_nayar"] = "#define DIFFUSE_OREN_NAYAR\n";
|
||||
actions.render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
|
||||
actions.render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
|
||||
|
||||
|
@ -1504,7 +1504,6 @@ ShaderCompilerRD::ShaderCompilerRD() {
|
||||
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_burley"] = "#define DIFFUSE_BURLEY\n";
|
||||
}
|
||||
|
||||
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_oren_nayar"] = "#define DIFFUSE_OREN_NAYAR\n";
|
||||
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_lambert_wrap"] = "#define DIFFUSE_LAMBERT_WRAP\n";
|
||||
actions[RS::SHADER_SPATIAL].render_mode_defines["diffuse_toon"] = "#define DIFFUSE_TOON\n";
|
||||
|
||||
|
@ -144,12 +144,7 @@ void light_compute(vec3 N, vec3 L, vec3 V, vec3 light_color, float attenuation,
|
||||
float metallic = unpackUnorm4x8(orms).z;
|
||||
if (metallic < 1.0) {
|
||||
float roughness = unpackUnorm4x8(orms).y;
|
||||
|
||||
#if defined(DIFFUSE_OREN_NAYAR)
|
||||
vec3 diffuse_brdf_NL;
|
||||
#else
|
||||
float diffuse_brdf_NL; // BRDF times N.L for calculating diffuse radiance
|
||||
#endif
|
||||
|
||||
#if defined(DIFFUSE_LAMBERT_WRAP)
|
||||
// energy conserving lambert wrap shader
|
||||
|
@ -204,7 +204,6 @@ ShaderTypes::ShaderTypes() {
|
||||
|
||||
shader_modes[RS::SHADER_SPATIAL].modes.push_back("diffuse_lambert");
|
||||
shader_modes[RS::SHADER_SPATIAL].modes.push_back("diffuse_lambert_wrap");
|
||||
shader_modes[RS::SHADER_SPATIAL].modes.push_back("diffuse_oren_nayar");
|
||||
shader_modes[RS::SHADER_SPATIAL].modes.push_back("diffuse_burley");
|
||||
shader_modes[RS::SHADER_SPATIAL].modes.push_back("diffuse_toon");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user