init commit
This commit is contained in:
1832
Assets/Lesson_1 Assets/Shaders/DissolveShader.shadergraph
Normal file
1832
Assets/Lesson_1 Assets/Shaders/DissolveShader.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 88d3598c89f9d2f44a0163ee7b6ac748
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
34
Assets/Lesson_1 Assets/Shaders/GrassShader.compute
Normal file
34
Assets/Lesson_1 Assets/Shaders/GrassShader.compute
Normal file
@@ -0,0 +1,34 @@
|
||||
#pragma kernel CSMain
|
||||
|
||||
RWStructuredBuffer<float4x4> matrices;
|
||||
|
||||
int _CountX;
|
||||
int _CountZ;
|
||||
float _SizeX;
|
||||
float _SizeZ;
|
||||
float _Height;
|
||||
|
||||
[numthreads(64, 1, 1)]
|
||||
void CSMain(uint3 id : SV_DispatchThreadID)
|
||||
{
|
||||
uint idx = id.x;
|
||||
uint total = _CountX * _CountZ;
|
||||
if (idx >= total)
|
||||
return;
|
||||
|
||||
uint ix = idx % _CountX;
|
||||
uint iz = idx / _CountX;
|
||||
|
||||
float fx = ((float) ix / (_CountX - 1)) * _SizeX - (_SizeX * 0.5);
|
||||
float fz = ((float) iz / (_CountZ - 1)) * _SizeZ - (_SizeZ * 0.5);
|
||||
float fy = _Height;
|
||||
|
||||
float4x4 m = float4x4(
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
fx, fy, fz, 1
|
||||
);
|
||||
|
||||
matrices[idx] = m;
|
||||
}
|
||||
7
Assets/Lesson_1 Assets/Shaders/GrassShader.compute.meta
Normal file
7
Assets/Lesson_1 Assets/Shaders/GrassShader.compute.meta
Normal file
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 167396dfa7434834787815bb5fbb3a7f
|
||||
ComputeShaderImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1960
Assets/Lesson_1 Assets/Shaders/WindShader.shadergraph
Normal file
1960
Assets/Lesson_1 Assets/Shaders/WindShader.shadergraph
Normal file
File diff suppressed because it is too large
Load Diff
10
Assets/Lesson_1 Assets/Shaders/WindShader.shadergraph.meta
Normal file
10
Assets/Lesson_1 Assets/Shaders/WindShader.shadergraph.meta
Normal file
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 97a637787e959c74b8fbd5e5c72343be
|
||||
ScriptedImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
|
||||
Reference in New Issue
Block a user