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
1fbb83de
Unverified
Commit
1fbb83de
authored
Feb 20, 2018
by
Rémi Verschelde
Committed by
GitHub
Feb 20, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16467 from godotengine/gles3-light-shader-time
using TIME in light shader enables uses_fragment_time
parents
2c44b2ce
bb655856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
shader_compiler_gles3.cpp
drivers/gles3/shader_compiler_gles3.cpp
+8
-7
shader_compiler_gles3.h
drivers/gles3/shader_compiler_gles3.h
+1
-0
No files found.
drivers/gles3/shader_compiler_gles3.cpp
View file @
1fbb83de
...
...
@@ -477,22 +477,22 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
current_func_name
=
fnode
->
name
;
if
(
fnode
->
name
==
"vertex"
)
{
if
(
fnode
->
name
==
vertex_name
)
{
_dump_function_deps
(
pnode
,
fnode
->
name
,
function_code
,
r_gen_code
.
vertex_global
,
added_vtx
);
r_gen_code
.
vertex
=
function_code
[
"vertex"
];
r_gen_code
.
vertex
=
function_code
[
vertex_name
];
}
if
(
fnode
->
name
==
"fragment"
)
{
if
(
fnode
->
name
==
fragment_name
)
{
_dump_function_deps
(
pnode
,
fnode
->
name
,
function_code
,
r_gen_code
.
fragment_global
,
added_fragment
);
r_gen_code
.
fragment
=
function_code
[
"fragment"
];
r_gen_code
.
fragment
=
function_code
[
fragment_name
];
}
if
(
fnode
->
name
==
"light"
)
{
if
(
fnode
->
name
==
light_name
)
{
_dump_function_deps
(
pnode
,
fnode
->
name
,
function_code
,
r_gen_code
.
fragment_global
,
added_fragment
);
r_gen_code
.
light
=
function_code
[
"light"
];
r_gen_code
.
light
=
function_code
[
light_name
];
}
}
...
...
@@ -573,7 +573,7 @@ String ShaderCompilerGLES3::_dump_node_code(SL::Node *p_node, int p_level, Gener
if
(
current_func_name
==
vertex_name
)
{
r_gen_code
.
uses_vertex_time
=
true
;
}
if
(
current_func_name
==
fragment_name
)
{
if
(
current_func_name
==
fragment_name
||
current_func_name
==
light_name
)
{
r_gen_code
.
uses_fragment_time
=
true
;
}
}
...
...
@@ -939,6 +939,7 @@ ShaderCompilerGLES3::ShaderCompilerGLES3() {
vertex_name
=
"vertex"
;
fragment_name
=
"fragment"
;
light_name
=
"light"
;
time_name
=
"TIME"
;
List
<
String
>
func_list
;
...
...
drivers/gles3/shader_compiler_gles3.h
View file @
1fbb83de
...
...
@@ -83,6 +83,7 @@ private:
StringName
current_func_name
;
StringName
vertex_name
;
StringName
fragment_name
;
StringName
light_name
;
StringName
time_name
;
Set
<
StringName
>
used_name_defines
;
...
...
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