From b75d0be0a79c906c3e68fcf0ff40459856c2eefb Mon Sep 17 00:00:00 2001 From: CrispyPin Date: Sun, 11 Aug 2024 13:44:40 +0200 Subject: [PATCH] reduce raymarching quality on some props --- Assets/raymarched/Raymarching.unity | 6 +++--- Assets/raymarched/bocs.mat | 2 +- Assets/raymarched/flesh_cube.shader | 4 ++-- Assets/raymarched/glitch_sphere.mat | 4 ++-- Assets/raymarched/loops.shader | 4 ++-- Assets/test/TestProps.unity | 2 +- UserSettings/EditorUserSettings.asset | 4 ++-- text_shader/src/main.rs | 1 - 8 files changed, 13 insertions(+), 14 deletions(-) diff --git a/Assets/raymarched/Raymarching.unity b/Assets/raymarched/Raymarching.unity index 86f1e32..665f7f2 100644 --- a/Assets/raymarched/Raymarching.unity +++ b/Assets/raymarched/Raymarching.unity @@ -143,7 +143,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &34125274 MonoBehaviour: m_ObjectHideFlags: 0 @@ -1756,7 +1756,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &853608960 MonoBehaviour: m_ObjectHideFlags: 0 @@ -3250,7 +3250,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 0 + m_IsActive: 1 --- !u!114 &2089314930 MonoBehaviour: m_ObjectHideFlags: 0 diff --git a/Assets/raymarched/bocs.mat b/Assets/raymarched/bocs.mat index 1f393c2..81a7568 100644 --- a/Assets/raymarched/bocs.mat +++ b/Assets/raymarched/bocs.mat @@ -57,7 +57,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Ints: - - _MaxSteps: 128 + - _MaxSteps: 100 m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 diff --git a/Assets/raymarched/flesh_cube.shader b/Assets/raymarched/flesh_cube.shader index 2a8ef2a..abf5e16 100644 --- a/Assets/raymarched/flesh_cube.shader +++ b/Assets/raymarched/flesh_cube.shader @@ -13,9 +13,9 @@ Shader "CrispyPin/FleshCube2" #pragma vertex vert #pragma fragment frag - #define MAX_STEPS 128 + #define MAX_STEPS 100 #define MAX_DIST 128 - #define SURF_DIST 0.01 + #define SURF_DIST 0.025 #define SCENE_FN main #define SCENE_SCALE 0.04 diff --git a/Assets/raymarched/glitch_sphere.mat b/Assets/raymarched/glitch_sphere.mat index 1f3e886..b372494 100644 --- a/Assets/raymarched/glitch_sphere.mat +++ b/Assets/raymarched/glitch_sphere.mat @@ -57,7 +57,7 @@ Material: m_Scale: {x: 1, y: 1} m_Offset: {x: 0, y: 0} m_Ints: - - _MaxSteps: 128 + - _MaxSteps: 32 m_Floats: - _BumpScale: 1 - _Cutoff: 0.5 @@ -75,7 +75,7 @@ Material: - _SmoothnessTextureChannel: 0 - _SpecularHighlights: 1 - _SrcBlend: 1 - - _SurfDist: 0.001 + - _SurfDist: 0.02 - _UVSec: 0 - _ZWrite: 1 m_Colors: diff --git a/Assets/raymarched/loops.shader b/Assets/raymarched/loops.shader index 8899f9b..f219733 100644 --- a/Assets/raymarched/loops.shader +++ b/Assets/raymarched/loops.shader @@ -13,8 +13,8 @@ Shader "CrispyPin/Loops" #pragma vertex vert #pragma fragment frag - #define MAX_STEPS 128 - #define MAX_DIST 128 + #define MAX_STEPS 64 + #define MAX_DIST 256 #define SURF_DIST 0.01 #define SCENE_FN main diff --git a/Assets/test/TestProps.unity b/Assets/test/TestProps.unity index a589cc1..b5aa4e7 100644 --- a/Assets/test/TestProps.unity +++ b/Assets/test/TestProps.unity @@ -1472,7 +1472,7 @@ MonoBehaviour: m_EditorClassIdentifier: type: 3 objectId: 9fee86b2-a9bd-46a3-a364-5f94506c4253 - randomNum: 95403234 + randomNum: 23882205 unityVersion: 2021.3.41f1 cckVersion: 3.10:132 --- !u!114 &2046637845 diff --git a/UserSettings/EditorUserSettings.asset b/UserSettings/EditorUserSettings.asset index 57d2e92..d252266 100644 --- a/UserSettings/EditorUserSettings.asset +++ b/UserSettings/EditorUserSettings.asset @@ -9,10 +9,10 @@ EditorUserSettings: value: 5452010404540f5f0f0b5e7415250d12404e4d7f757d2732287b4a6bb2b13569 flags: 0 RecentlyUsedSceneGuid-1: - value: 5a050c0250565f5a58585d7244700c1245154e292d7970687d7c1f6be1e1656b + value: 5b545552530c5f030c08552111705b474f15497f2e2d77327e284967bab5606e flags: 0 RecentlyUsedSceneGuid-2: - value: 5b545552530c5f030c08552111705b474f15497f2e2d77327e284967bab5606e + value: 5a050c0250565f5a58585d7244700c1245154e292d7970687d7c1f6be1e1656b flags: 0 vcSharedLogLevel: value: 0d5e400f0650 diff --git a/text_shader/src/main.rs b/text_shader/src/main.rs index ebc5c11..890a63c 100644 --- a/text_shader/src/main.rs +++ b/text_shader/src/main.rs @@ -8,7 +8,6 @@ use image::{GenericImageView, ImageReader}; const FULL_CHARSET: &[u8] = b" !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\n\t"; fn main() { - const A:u8 = FULL_CHARSET[64]; // source code conversion let source_text = read_to_string("../Assets/test/quine.shader").unwrap(); let mut encoded_text: Vec = Vec::new();