Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
071bf817
Commit
071bf817
authored
Oct 11, 2019
by
clayjohn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only render depth with alpha prepass on prepass
parent
74ab8be5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
rasterizer_scene_gles3.cpp
drivers/gles3/rasterizer_scene_gles3.cpp
+3
-3
rasterizer_scene_gles3.h
drivers/gles3/rasterizer_scene_gles3.h
+1
-1
No files found.
drivers/gles3/rasterizer_scene_gles3.cpp
View file @
071bf817
...
...
@@ -1093,7 +1093,7 @@ void RasterizerSceneGLES3::gi_probe_instance_set_bounds(RID p_probe, const Vecto
////////////////////////////
////////////////////////////
bool
RasterizerSceneGLES3
::
_setup_material
(
RasterizerStorageGLES3
::
Material
*
p_material
,
bool
p_alpha_pass
)
{
bool
RasterizerSceneGLES3
::
_setup_material
(
RasterizerStorageGLES3
::
Material
*
p_material
,
bool
p_
depth_pass
,
bool
p_
alpha_pass
)
{
/* this is handled outside
if (p_material->shader->spatial.cull_mode == RasterizerStorageGLES3::Shader::Spatial::CULL_MODE_DISABLED) {
...
...
@@ -1121,7 +1121,7 @@ bool RasterizerSceneGLES3::_setup_material(RasterizerStorageGLES3::Material *p_m
if
(
state
.
current_depth_draw
!=
p_material
->
shader
->
spatial
.
depth_draw_mode
)
{
switch
(
p_material
->
shader
->
spatial
.
depth_draw_mode
)
{
case
RasterizerStorageGLES3
:
:
Shader
::
Spatial
::
DEPTH_DRAW_ALPHA_PREPASS
:
{
glDepthMask
(
GL_TRUE
);
glDepthMask
(
p_depth_pass
);
// If some transparent objects write to depth, we need to re-copy depth texture when we need it
if
(
p_alpha_pass
&&
!
state
.
used_depth_prepass
)
{
state
.
prepared_depth_texture
=
false
;
...
...
@@ -2241,7 +2241,7 @@ void RasterizerSceneGLES3::_render_list(RenderList::Element **p_elements, int p_
storage
->
info
.
render
.
material_switch_count
++
;
rebind
=
_setup_material
(
material
,
p_alpha_pass
);
rebind
=
_setup_material
(
material
,
use_opaque_prepass
,
p_alpha_pass
);
if
(
rebind
)
{
storage
->
info
.
render
.
shader_rebind_count
++
;
...
...
drivers/gles3/rasterizer_scene_gles3.h
View file @
071bf817
...
...
@@ -832,7 +832,7 @@ public:
_FORCE_INLINE_
void
_set_cull
(
bool
p_front
,
bool
p_disabled
,
bool
p_reverse_cull
);
_FORCE_INLINE_
bool
_setup_material
(
RasterizerStorageGLES3
::
Material
*
p_material
,
bool
p_alpha_pass
);
_FORCE_INLINE_
bool
_setup_material
(
RasterizerStorageGLES3
::
Material
*
p_material
,
bool
p_
depth_pass
,
bool
p_
alpha_pass
);
_FORCE_INLINE_
void
_setup_geometry
(
RenderList
::
Element
*
e
,
const
Transform
&
p_view_transform
);
_FORCE_INLINE_
void
_render_geometry
(
RenderList
::
Element
*
e
);
_FORCE_INLINE_
void
_setup_light
(
RenderList
::
Element
*
e
,
const
Transform
&
p_view_transform
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment