From e5da172a85368551954332836e52d2c98b37edec Mon Sep 17 00:00:00 2001 From: yum Date: Wed, 25 Jan 2023 21:55:31 -0800 Subject: Finish basic PBR shading TaSTT shader now uses physically based rendering (PBR). Users can pick smoothness, metallic, and emissive. This implementation borrows heavily from catlikecoding.com's excellent tutorials, which are released under MIT No Attribution (MIT-0). https://catlikecoding.com/unity/tutorials/license/ To retain what little clarity remains in the shader, I have chosen not to attribute the code in the source itself. --- Scripts/generate_shader.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Scripts') diff --git a/Scripts/generate_shader.py b/Scripts/generate_shader.py index 5ad9e70..9ff0bc3 100644 --- a/Scripts/generate_shader.py +++ b/Scripts/generate_shader.py @@ -132,22 +132,22 @@ if __name__ == "__main__": nrows = int(args.rows) ncols = int(args.cols) - replacement = generateUnityParams(nbytes, nrows, ncols, prefix = " ") + replacement = generateUnityParams(nbytes, nrows, ncols, prefix = "") #print(replacement) macro = "// %TEMPLATE__UNITY_ROW_COL_PARAMS%" - assert(applyLineMacro(args.shader_template, args.shader_path, macro, replacement) == 1) + applyLineMacro(args.shader_template, args.shader_path, macro, replacement) - replacement = generateCgParams(nbytes, nrows, ncols, prefix = " ") + replacement = generateCgParams(nbytes, nrows, ncols, prefix = " ") #print(replacement) macro = "// %TEMPLATE__CG_ROW_COL_PARAMS%" - assert(applyLineMacro(args.shader_path, args.shader_path, macro, replacement) == 1) + applyLineMacro(args.shader_path, args.shader_path, macro, replacement) - replacement = generateCgConstants(nbytes, nrows, ncols, prefix = " ") + replacement = generateCgConstants(nbytes, nrows, ncols, prefix = " ") #print(replacement) macro = "// %TEMPLATE__CG_ROW_COL_CONSTANTS%" - assert(applyLineMacro(args.shader_path, args.shader_path, macro, replacement) == 1) + applyLineMacro(args.shader_path, args.shader_path, macro, replacement) - replacement = generateLetterAccessor(nbytes, nrows, ncols, prefix = " ") + replacement = generateLetterAccessor(nbytes, nrows, ncols, prefix = " ") #print(replacement) macro = "// %TEMPLATE__CG_LETTER_ACCESSOR%" - assert(applyLineMacro(args.shader_path, args.shader_path, macro, replacement) == 1) + applyLineMacro(args.shader_path, args.shader_path, macro, replacement) -- cgit v1.2.3