This file contains 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
SplatParticles[(int)_particleContainerSize) / THREAD_GROUPS_X, 1, 1]( | |
horiRes: pointMap.HoriRes, vertRes: pointMap.VertRes, | |
planeWidth: pointMap.Width, planeHeight: pointMap.Height, | |
waveParticleBuffer: _waveParticlesBuffer, | |
splateTexture: _splatTexture) |
This file contains 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
/// | |
/// Initialise the SplatParticles GPU Compute Kernel to splat the particles to a texture | |
/// | |
_gpuSplatParticles.SetTexture(kernel_SplatParticles, SPLAT_TEXTURE, _splatTexture); | |
_gpuSplatParticles.SetBuffer(kernel_SplatParticles, WAVE_PARTICLE_BUFFER, _waveParticlesBuffer); | |
_gpuSplatParticles.SetInt(HORI_RES, pointMap.HoriRes); | |
_gpuSplatParticles.SetInt(VERT_RES, pointMap.VertRes); | |
_gpuSplatParticles.SetFloat(PLANE_WIDTH, pointMap.Width); | |
_gpuSplatParticles.SetFloat(PLANE_HEIGHT, pointMap.Height); |
This file contains 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
private const string HORI_RES = "horiRes"; | |
private const string VERT_RES = "vertRes"; | |
private const string PLANE_WIDTH = "planeWidth"; | |
private const string PLANE_HEIGHT = "planeHeight"; | |
private const string WAVE_PARTICLE_BUFFER = "waveParticleBuffer"; | |
private const string SPLAT_TEXTURE = "splatTexture"; | |
private const string SPLAT_PARTICLES = "SplatParticles"; |
This file contains 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
const int horiRes; // The horizontal resolution of the water's surface | |
const int vertRes; // The vertical resolution of the water's surface | |
const float planeWidth; // The physical width of the water's surface in the game world | |
const float planeHeight; // The physical height of the water's surface in the game world | |
StructuredBuffer<WaveParticle> waveParticleBuffer; // A buffer full of Wave Particle instances! | |
RWTexture2D<float4> splatTexture; // The texture that we splat the Wave Particles to! | |
/// | |
/// Splat the Wave Particles frmo wavePaticleBuffer to the splatTexture | |
/// |