diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-11-24 22:34:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 22:34:48 +0100 |
commit | 547c27077721cf024031bedd69e55268c8d6b410 (patch) | |
tree | e67c55b758d5ca5553e6ff08bc5058b5a501deec /glsl_builders.py | |
parent | e49b127b41a425fadc47d09d375624c5511f1f06 (diff) | |
parent | 20deb0917d466ca9dd1bf435dfb326c72f73e3c0 (diff) |
Merge pull request #51679 from Je06jm/fsr
AMD FidelityFX Super Resolution
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: |