Hi all,
I’m currently working on translating some shaders into shaderlab.I’ve been pretty successful so far but when I wanted to implement my TextureEncoding I ran into a problem.
here is it:
#define VOLUME_SIZE 32
float4 noise_3d(float3 Pos : POSITION) : COLOR
{
float4 myNoise = float4(noise((Pos+1)*500),noise((Pos+2)*500),noise((Pos+3)*500),1);
return normalize(myNoise)*0.009;
}
texture NoiseMap <
string ResourceType = "VOLUME";
string function = "noise_3d";
float3 Dimensions = {VOLUME_SIZE,VOLUME_SIZE,VOLUME_SIZE};
// int miplevels = 1;
string format = "A8R8G8B8";
>;
sampler3D noisemap = sampler_state
{
Texture = <NoiseMap>;
MipFilter = LINEAR;
MinFilter = LINEAR;
MagFilter = LINEAR;
};
Can anybody help me how to translate these snippets into shaderlab?