This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Godot custom post process manual: | |
| // https://docs.godotengine.org/en/stable/tutorials/shaders/advanced_postprocessing.html | |
| shader_type spatial; | |
| render_mode unshaded; | |
| uniform float ray_count = 20.; | |
| uniform float geo_count = 8.; | |
| uniform float geo_size = 2.5; | |
| uniform float geo_shell = .1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| [ExecuteInEditMode] | |
| public class Geometry : MonoBehaviour { | |
| public Material material; | |
| private Transform camTransform; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // En C# dans un script | |
| width = 100; | |
| height = 1; | |
| texture = new Texture2D(width, height, TextureFormat.RGBAFloat, false); | |
| texture.filterMode = FilterMode.Point; | |
| Color[] array = new Color[width*height]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [numthreads(8,8,1)] | |
| void ComputeBoid (uint3 id : SV_DispatchThreadID) | |
| { | |
| float epsilon = 0.0001; | |
| float2 position = _BoidBuffer[id.xy].xy; | |
| float2 velocity = _BoidBuffer[id.xy].zw; | |
| float2 target = float2(0,0); | |
| float2 offset = float2(0,epsilon); | |
| float2 gravity = normalize(target-position+epsilon); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.IO; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| [RequireComponent(typeof(Camera))] | |
| public class RenderImage : MonoBehaviour | |
| { | |
| public int width = 4096; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| public class FrameBuffer | |
| { | |
| RenderTexture[] textures; | |
| int currentTexture; | |
| public FrameBuffer (int count) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Custom/Equirectangle" | |
| { | |
| Properties | |
| { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _Panorama ("Panorama", CUBE) = "white" {} | |
| } | |
| SubShader | |
| { | |
| Pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Custom/NormalDisplace" { | |
| Properties { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _Color ("Color", Color) = (1,1,1,1) | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 100 | |
| Cull Off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Unlit/Test" { | |
| Properties { | |
| _MainTex ("Texture", 2D) = "white" {} | |
| _Color ("Color", Color) = (1,1,1,1) | |
| } | |
| SubShader { | |
| Tags { "RenderType"="Opaque" } | |
| LOD 100 | |
| Cull Off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using System.Collections; | |
| [RequireComponent (typeof (Camera))] | |
| public class FrameBuffer : MonoBehaviour | |
| { | |
| public string textureName = "_FrameBuffer"; | |
| Camera cameraCapture; | |
| int currentTexture; | |
| RenderTexture[] textures; |
NewerOlder