diff options
author | Je06jm <jeremymoyes3@gmail.com> | 2021-11-23 14:16:03 -0700 |
---|---|---|
committer | Je06jm <jeremymoyes3@gmail.com> | 2021-11-23 14:16:03 -0700 |
commit | 20deb0917d466ca9dd1bf435dfb326c72f73e3c0 (patch) | |
tree | ba031db5386d2d86baffc8a7ded444b2ac441a7c /glsl_builders.py | |
parent | 5efe80f3085c8c6451363fe4c743bf3d7fc20b6c (diff) | |
download | redot-engine-20deb0917d466ca9dd1bf435dfb326c72f73e3c0.tar.gz |
Implemented AMD's FSR as a computer shader for upscaling 3D scenes
Diffstat (limited to 'glsl_builders.py')
-rw-r--r-- | glsl_builders.py | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/glsl_builders.py b/glsl_builders.py index 57aaed5f9f..0926212e50 100644 --- a/glsl_builders.py +++ b/glsl_builders.py @@ -29,6 +29,10 @@ def include_file_in_rd_header(filename, header_data, depth): while line: + index = line.find("//") + if index != -1: + line = line[:index] + if line.find("#[vertex]") != -1: header_data.reading = "vertex" line = fs.readline() @@ -55,7 +59,14 @@ def include_file_in_rd_header(filename, header_data, depth): import os.path - included_file = os.path.relpath(os.path.dirname(filename) + "/" + includeline) + included_file = "" + + if includeline.startswith("thirdparty/"): + included_file = os.path.relpath(includeline) + + else: + included_file = os.path.relpath(os.path.dirname(filename) + "/" + includeline) + if not included_file in header_data.vertex_included_files and header_data.reading == "vertex": header_data.vertex_included_files += [included_file] if include_file_in_rd_header(included_file, header_data, depth + 1) is None: |