Merge pull request #52409 from GiantBlargg/position-depth-pre-pass
This commit is contained in:
commit
ec23d1348a
|
@ -2551,7 +2551,7 @@ void RenderForwardClustered::_geometry_instance_add_surface_with_material(Geomet
|
|||
|
||||
SceneShaderForwardClustered::MaterialData *material_shadow = nullptr;
|
||||
void *surface_shadow = nullptr;
|
||||
if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass) {
|
||||
if (!p_material->shader_data->uses_particle_trails && !p_material->shader_data->writes_modelview_or_projection && !p_material->shader_data->uses_vertex && !p_material->shader_data->uses_position && !p_material->shader_data->uses_discard && !p_material->shader_data->uses_depth_pre_pass) {
|
||||
flags |= GeometryInstanceSurfaceDataCache::FLAG_USES_SHARED_SHADOW_MATERIAL;
|
||||
material_shadow = (SceneShaderForwardClustered::MaterialData *)storage->material_get_data(scene_shader.default_material, RendererStorageRD::SHADER_TYPE_3D);
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) {
|
|||
|
||||
unshaded = false;
|
||||
uses_vertex = false;
|
||||
uses_position = false;
|
||||
uses_sss = false;
|
||||
uses_transmittance = false;
|
||||
uses_screen_texture = false;
|
||||
|
@ -126,6 +127,7 @@ void SceneShaderForwardClustered::ShaderData::set_code(const String &p_code) {
|
|||
actions.write_flag_pointers["MODELVIEW_MATRIX"] = &writes_modelview_or_projection;
|
||||
actions.write_flag_pointers["PROJECTION_MATRIX"] = &writes_modelview_or_projection;
|
||||
actions.write_flag_pointers["VERTEX"] = &uses_vertex;
|
||||
actions.write_flag_pointers["POSITION"] = &uses_position;
|
||||
|
||||
actions.uniforms = &uniforms;
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ public:
|
|||
|
||||
bool unshaded;
|
||||
bool uses_vertex;
|
||||
bool uses_position;
|
||||
bool uses_sss;
|
||||
bool uses_transmittance;
|
||||
bool uses_screen_texture;
|
||||
|
|
Loading…
Reference in New Issue