diff options
Diffstat (limited to 'tools/shadertoy/convert_shadertoy.py')
| -rwxr-xr-x | tools/shadertoy/convert_shadertoy.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/shadertoy/convert_shadertoy.py b/tools/shadertoy/convert_shadertoy.py index e85f384..ad4c310 100755 --- a/tools/shadertoy/convert_shadertoy.py +++ b/tools/shadertoy/convert_shadertoy.py @@ -10,8 +10,8 @@ # ./tools/shadertoy/convert_shadertoy.py tools/shadertoy/example.txt Rainbow # # Generates: -# - src/gpu/effects/<effect>_effect.h -# - src/gpu/effects/<effect>_effect.cc +# - src/effects/<effect>_effect.h +# - src/effects/<effect>_effect.cc # - workspaces/main/shaders/<effect>.wgsl # # The script performs basic ShaderToy→WGSL conversion: @@ -150,7 +150,7 @@ def generate_header(effect_name, is_post_process=False): #define {upper_name}_EFFECT_H_ #include "gpu/effect.h" -#include "gpu/effects/post_process_helper.h" +#include "gpu/post_process_helper.h" class {class_name} : public PostProcessEffect {{ public: @@ -197,7 +197,7 @@ def generate_implementation(effect_name, is_post_process=False): // Generated by convert_shadertoy.py #include "gpu/demo_effects.h" -#include "gpu/effects/post_process_helper.h" +#include "gpu/post_process_helper.h" #include "gpu/gpu.h" {class_name}::{class_name}(const GpuContext& ctx) : PostProcessEffect(ctx) {{ @@ -309,8 +309,8 @@ def main(): print(" --shader-only Only regenerate .wgsl shader (skip .h/.cc files)") print() print("This will generate:") - print(" src/gpu/effects/<effect>_effect.h") - print(" src/gpu/effects/<effect>_effect.cc") + print(" src/effects/<effect>_effect.h") + print(" src/effects/<effect>_effect.cc") print(" workspaces/main/shaders/<effect>.wgsl") sys.exit(1) @@ -370,20 +370,20 @@ def main(): print(f" SHADER_{upper_name}, NONE, shaders/{snake_name}.wgsl, \"{effect_name} effect\"") print() print() - print("2. Add shader declaration to src/gpu/effects/shaders.h:") + print("2. Add shader declaration to src/gpu/shaders.h:") print(f" extern const char* {snake_name}_shader_wgsl;") print() - print("3. Add shader definition to src/gpu/effects/shaders.cc:") + print("3. Add shader definition to src/gpu/shaders.cc:") print(f" const char* {snake_name}_shader_wgsl = SafeGetAsset(AssetId::ASSET_SHADER_{upper_name});") print() print("4. Include header in src/gpu/demo_effects.h:") - print(f' #include "gpu/effects/{snake_name}_effect.h"') + print(f' #include "effects/{snake_name}_effect.h"') print() print("5. Add to timeline in workspaces/main/timeline.seq:") print(f" EFFECT + {effect_name}Effect 0.0 10.0") print() print("6. Add to CMakeLists.txt GPU_SOURCES (both headless and normal mode):") - print(f" src/gpu/effects/{snake_name}_effect.cc") + print(f" src/effects/{snake_name}_effect.cc") print() print("7. Update src/tests/gpu/test_demo_effects.cc:") test_list = "post_process_effects" if is_post_process else "scene_effects" |
