2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

CWE Directory Reorganization

Rearrange directory structure of CWE to be loosely equivalent to
the H'uru Plasma repository.

Part 1: Movement of directories and files.
This commit is contained in:
rarified
2021-05-15 12:49:46 -06:00
parent c3f4a640a3
commit 96903e8dca
4002 changed files with 159 additions and 644 deletions

View File

@ -0,0 +1,17 @@
// Grab noise texture,
// modulate biased version by vtx color 0,
// add to vtx color 1
ps.1.1
tex t0;
tex t1;
add r0.rgb, t0_bias, t1_bias;
+add r0.a, t0, t1;
//mov r0, t1_bias;
mad r0.rgb, r0, v0, v1;
//mov r0, v1;

View File

@ -0,0 +1,14 @@
ps.1.1
// Add blend color, output sum of alpha
// Color is t0 + t1
// Alpha is t0.a + t1.a
tex t0;
tex t1;
add r0.rgb, t0, t1;
+add r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Add blend color, output base alpha
// Color is t0 + t1
// Alpha is t0.a
tex t0;
tex t1;
add r0.rgb, t0, t1;
+mov r0.a, t0;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Add blend color, output product of alpha
// Color is t0 + t1
// Alpha is t0.a * t1.a
tex t0;
tex t1;
add r0.rgb, t0, t1;
+mul r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Alpha blend color, output sum of alphas
// Color is t0 * (1 - t1.a) + t1 * t1.a
// Alpha is t0.a + t1.a
tex t0
tex t1
lrp r0.rgb, t1.a, t1, t0
add r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Alpha blend layers, output base alpha
//
// Color is t0 * (1 - t1.a) + t1 * t1.a
// Alpha is t0.a
tex t0
tex t1
lrp r0.rgb, t1.a, t1, t0
mov r0.a, t0;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Alpha blend color, output product of alphas
// Color is t0 * (1 - t1.a) + t1 * t1.a
// Alpha is t0.a * t1.a
tex t0
tex t1
lrp r0.rgb, t1.a, t1, t0
mul r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,9 @@
ps.1.1
// Single layer, just modulate by vertex color and emit
//
tex t0
mul r0, t0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Multiply blend color, output sum of alpha
// Color is t0 * t1
// Alpha is t0.a + t1.a
tex t0;
tex t1;
mul r0.rgb, t0, t1;
+add r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Multiply blend color, output base alpha
// Color is t0 * t1
// Alpha is t0.a
tex t0;
tex t1;
mul r0.rgb, t0, t1;
+mov r0.a, t0;
mul r0, r0, v0;

View File

@ -0,0 +1,14 @@
ps.1.1
// Multiply blend color, output product of alpha
// Color is t0 * t1
// Alpha is t0.a * t1.a
tex t0;
tex t1;
mul r0.rgb, t0, t1;
+mul r0.a, t0, t1;
mul r0, r0, v0;

View File

@ -0,0 +1,31 @@
// Composite the cosines together.
// Input map is cosine(pix) for each of
// the 4 waves.
//
// The constants are set up so:
// Nx = -freq * amp * dirX * cos(pix);
// Ny = -freq * amp * dirY * cos(pix);
// So c[i].x = -freq[i] * amp[i] * dirX[i]
// etc.
// All textures are:
// (r,g,b,a) = (cos(), cos(), 1, 1)
//
// So c[0].z = 1, but all other c[i].z = 0
// Note also the c4 used for biasing back at the end.
ps.1.1
tex t0;
tex t1;
tex t2;
tex t3;
mul r0, t0_bx2, c0;
mad r0, t1_bx2, c1, r0;
mad r0, t2_bx2, c2, r0;
mad r0, t3_bx2, c3, r0;
// Now bias it back into range [0..1] for output.
mul r0, r0, c4; // c4 = (0.5, 0.5, 0.5, 1)
add r0, r0, c4;
//mov r0, c4;

View File

@ -0,0 +1,6 @@
ps.1.1
// Grass shader. Just does a simple tex mult
tex t0
mul r0, t0, v0

View File

@ -0,0 +1,35 @@
// Composite the cosines together.
// Input map is cosine(pix) for each of
// the 4 waves.
//
// The constants are set up so:
// Nx = -freq * amp * dirX * cos(pix);
// Ny = -freq * amp * dirY * cos(pix);
// So c[i].x = -freq[i] * amp[i] * dirX[i]
// etc.
// All textures are:
// (r,g,b,a) = (cos(), cos(), 1, 1)
//
// Here all c[i].z = 0, because we're accumulating ontop
// of layers that have been primed with z = 1.
// Note also the c4 used for biasing back at the end.
ps.1.1
tex t0;
tex t1;
tex t2;
tex t3;
mul r0, t0_bx2, c0;
mad r0, t1_bx2, c1, r0;
mad r0, t2_bx2, c2, r0;
mad r0, t3_bx2, c3, r0;
// Now bias it back into range [0..1] for output.
mul r0.rgb, r0, c4;
+mov r0.a, c4;
add r0.rgb, r0, c5;
//mov r0, c4;

View File

@ -0,0 +1,21 @@
ps.1.1
def c0, 1.0, 1.0, 1.0, 1.0 // Temp Hack
tex t0;
tex t1;
tex t2;
mov r1.a, t1;
lrp r0.rgb, r1.a, t1, t0;
+mul r0.a, 1-t1, 1-t0;
lrp r0.rgb, t2.a, t2, r0;
+mul r0.a, 1-t2, r0;
mul r0.rgb, r0, v0;
+mul r0.a, 1-r0, v0;
//mov r0.a, c1;
//mov r0.rgb, t2;
//+mov r0.a, 1-t2;

View File

@ -0,0 +1,35 @@
// Very simular to ps_WaveFixed.inl. Only the final coloring is different.
// Even though so far they are identical.
ps.1.1
//def c0, 1.0, 0.0, 0.0, 1.0 // Temp Hack
tex t0 // Bind texture in stage 0 to register t0.
texm3x3pad t1, t0_bx2 // First row of matrix multiply.
texm3x3pad t2, t0_bx2 // Second row of matrix multiply.
texm3x3vspec t3, t0_bx2 // Third row of matrix multiply to get a 3-vector.
// Reflect 3-vector by the eye-ray vector.
// Use reflected vector to do a texture lookup
// at stage 3.
// t3 now has our reflected environment map value
// We've (presumably) attenuated the effect on a vertex basis
// and have our color w/ attenuated alpha in v0. So all we need
// is to multiply t3 by v0 into r0 and we're done.
mul r0.rgb, t3, v0;
+mul r0.a, t0, v0;
// mov r0, t0;
/*
tex t0;
texcoord t1;
texcoord t2;
texcoord t3;
mov r0.rgb, t3;
+mov r0.a, c0;
*/

View File

@ -0,0 +1,77 @@
//ps.1.1
// def c0, 1.0, 0.0, 0.0, 1.0
// mov r0, c0
// Short pixel shader. Use the texm3x3vspec to do a per-pixel
// reflected lookup into our environment map.
// Input:
// t0 - Normal map in tangent space. Apply _bx2 modifier to shift
// [0..255] -> [-1..1]
// t1 - UVW = tangent + eye2pos.x, map ignored.
// t2 - UVW = binormal + eye2pos.y, map ignored
// t3 - UVW = normal + eye2pos.z, map = environment cube map
// v0 - attenuating color/alpha.
// See docs on texm3x3vspec for explanation of the eye2pos wackiness.
// Output:
// r0 = reflected lookup from environment map X input v0.
// Since environment map has alpha = 255, the output of this
// shader can be used for either alpha or additive blending,
// as long as v0 is fed in appropriately.
ps.1.1
def c0, 1.0, 0.0, 0.0, 1.0 // Temp Hack
/*
def c1, 0.0, 1.0, 0.0, 1.0
def c2, 0.0, 0.0, 1.0, 1.0
*/
tex t0 // Bind texture in stage 0 to register t0.
texm3x3pad t1, t0_bx2 // First row of matrix multiply.
texm3x3pad t2, t0_bx2 // Second row of matrix multiply.
texm3x3vspec t3, t0_bx2 // Third row of matrix multiply to get a 3-vector.
// Reflect 3-vector by the eye-ray vector.
// Use reflected vector to do a texture lookup
// at stage 3.
// t3 now has our reflected environment map value
// We've (presumably) attenuated the effect on a vertex basis
// and have our color w/ attenuated alpha in v0. So all we need
// is to multiply t3 by v0 into r0, add our base color from v1 and we're done.
mad r0.rgb, t3, v0, v1;
/* HACKAGE
//+mul r0.a, v1, v0;
HACKAGE */
mov r0.a, v0; //HACKAGE
/*
mov r0.rgb, v0;
mov r0.a, v0;
*/
/*
tex t0;
texcoord t1;
texcoord t2;
texcoord t3;
mov r0.rgb, t3;
+mov r0.a, c0;
*/
/*
tex t0;
texcoord t1;
texcoord t2;
texcoord t3;
mul r0.rgb, t0_bx2, c1;
+mov r0.a, c2;
*/

View File

@ -0,0 +1,30 @@
ps.1.1
// Have a couple extra textures to burn here. Only thing
// I've thought of is to have an additional texture to
// make the front of the wave solid. So it's UVW would be
// the same as the base texture, but the texture itself would
// be just a thin horizontal band of alpha. Then just add that
// alpha to the output alpha.
//
// Let's get the first cut running first.
tex t0;
tex t1;
tex t2;
//mul r0, v0, t0;
//mul r0, r0, t1;
//add r0.a, r0, t2;
// 1.0 mov r0, t0;
// 1.0 mul r0, r0, t1;
mul r0, t0, t1;
// TEST add r0.a, r0, t2; // TEST
add r0, r0, t2; // TEST
mul r0, r0, v0;
//mul r0.rgb, r0, r0.a; // TEST
//mov r0, t1;

View File

@ -0,0 +1,63 @@
//ps.1.1
// def c0, 1.0, 0.0, 0.0, 1.0
// mov r0, c0
// Short pixel shader. Use the texm3x3vspec to do a per-pixel
// reflected lookup into our environment map.
// Input:
// t0 - Normal map in tangent space. Apply _bx2 modifier to shift
// [0..255] -> [-1..1]
// t1 - UVW = tangent + eye2pos.x, map ignored.
// t2 - UVW = binormal + eye2pos.y, map ignored
// t3 - UVW = normal + eye2pos.z, map = environment cube map
// v0 - attenuating color/alpha.
// See docs on texm3x3vspec for explanation of the eye2pos wackiness.
// Output:
// r0 = reflected lookup from environment map X input v0.
// Since environment map has alpha = 255, the output of this
// shader can be used for either alpha or additive blending,
// as long as v0 is fed in appropriately.
ps.1.1
//def c0, 1.0, 1.0, 1.0, 1.0 // Temp Hack
//def c1, 2.0, 2.0, 2.0, 1.0
//texcoord t0;
//texcoord t1;
//texcoord t2;
//texcoord t3;
tex t0 // Bind texture in stage 0 to register t0.
texm3x3pad t1, t0_bx2 // First row of matrix multiply.
texm3x3pad t2, t0_bx2 // Second row of matrix multiply.
texm3x3vspec t3, t0_bx2 // Third row of matrix multiply to get a 3-vector.
// Reflect 3-vector by the eye-ray vector.
// Use reflected vector to do a texture lookup
// at stage 3.
// t3 now has our reflected environment map value
// We've (presumably) attenuated the effect on a vertex basis
// and have our color w/ attenuated alpha in v0. So all we need
// is to multiply t3 by v0 into r0 and we're done.
mad r0.rgb, t3, v1, v0;
//add r0.rgb, t3, v0;
+mov r0.a, v1;
//mov r0.rgb, v1.a; // HACKAGE
//mov r0.a, v1.a; // HACKAGE
//mov r0, v1; // HACKAGE
//mov r0, c0
//mul r0, r0, t0;
//mov r0, v1;
//mov r0, t3;
//mov r0.rgb, t3;
//+mov r0.a, c0;

View File

@ -0,0 +1,21 @@
ps.1.1
//def c0, 1.0, 0.0, 0.0, 1.0 // Temp Hack
// Want
// Color: vert.rgb * t0.rgb
// Alpha: vert.a * t0.a * t1.a
tex t0;
//tex t1;
//mul r0.rgb, v0, t0;
//+mul r0.a, v0.a, t0.a;
//mul r0.a, r0.a, t1.a;
//mul r0, t0, t1;
mul r0, t0, v0;
//mov r0, t0;

View File

@ -0,0 +1,34 @@
vs.1.1
dcl_position v0
dcl_texcoord0 v7
// Take in a screen space position,
// transform the UVW,
// and spit it out.
// c0 = uvXform0[0]
// c1 = uvXform0[1]
// c2 = uvXform1[0]
// c3 = uvXform1[1]
// c4 = (0,0.5,1.0,2.0)
// c5 = (noiseScale, bias, 0, 1)
mov oPos, v0;
mov r0.zw, c4.xxxz; // yzw will stay constant (0,0,1);
dp4 r0.x, v7, c0;
dp4 r0.y, v7, c1;
mov oT0, r0;
dp4 r0.x, v7, c2;
dp4 r0.y, v7, c3;
mov oT1, r0;
mov oD0, c5.xxzz;
mov oD1, c5.yyzz;

View File

@ -0,0 +1,31 @@
vs.1.1
dcl_position v0
dcl_texcoord0 v7
// Take in a screen space position,
// transform the UVW,
// and spit it out.
// c4 = (0,0.5,1.0,2.0)
//mov r0, v0;
//mov r0.w, c4.zzzz;
//mov oPos, r0;
mov oPos, v0;
dp4 r0.x, v7, c0;
mov r0.yzw, c4.xxxz; // yzw will stay constant (0,0,1);
mov oT0, r0;
dp4 r0.x, v7, c1;
mov oT1, r0;
dp4 r0.x, v7, c2;
mov oT2, r0;
dp4 r0.x, v7, c3;
mov oT3, r0;

View File

@ -0,0 +1,60 @@
vs.1.1
// Grass shader. Moves verts according sine waves seeded by position
// Based on the article "Animated Grass with Pixel and Vertex Shaders"
// by John Isidoro and Drew Card, in the book
// "Direct3D ShaderX Vertex and Pixel Shader Tips and Tricks"
// c0 = Local2NDC
// c4 = (0.0, 0.5, 1.0, 2.0)
// c5 = (time, X, X, X)
// c6 = Pi constants
// c7 = Sin constants (-1/3!, 1/!5, -1/7!, 1/9!)
// c8 = waveDistortX
// c9 = waveDistortY
// c10 = waveDistortZ
// c11 = waveDirX (0.25, 0.0, -0.7, -0.8)
// c12 = waveDirY (0.0, 0.15, -0.7, 0.1)
// c13 = waveSpeed (0.2, 0.15, 0.4, 0.4)
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
mul r0, c11, v0.x // pos X,Y input to waves
mad r0, c12, v0.y, r0
mov r1, c5.x // time
mad r0, r1, c13, r0 // scale by speed and add to X,Y input
frc r0.xy, r0
frc r1.xy, r0.zwzw
mov r0.zw, r1.xyxy
sub r0, r0, c4.y // - 0.5
mul r1, r0, c6.w // *= 2 pi
mul r2, r1, r1 // ^2
mul r3, r2, r1 // ^3
mul r5, r3, r2 // ^5
mul r7, r5, r2 // ^7
mul r9, r7, r2 // ^9
mad r0, r3, c7.x, r1 // - r1^3 / 3!
mad r0, r5, c7.y, r0 // + r1^5 / 5!
mad r0, r7, c7.z, r0 // - r1^7 / 7!
mad r0, r9, c7.w, r0 // + r1^9 / 9!
dp4 r3.x, r0, c8
dp4 r3.y, r0, c9
dp4 r3.zw, r0, c10
sub r4, c4.z, v7.y
mul r3, r3, r4 // mult by Y tex coord. So the waves only affect the top verts
mov r2.w, v0 //
add r2.xyz, r3, v0 // add offset to position
m4x4 oPos, r2, c0 // trans to NDC
mov oFog, c4.z // no fog
mov oD0, v5
mov oT0, v7

View File

@ -0,0 +1,245 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c25; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c30 = waterlevel + offset
// c31 = (maxAtten - minAtten) / depthFalloff
// c32 = minAtten.
// And in particular:
// c30.w = waterlevel
// c31.w = 1.f;
// c32.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c30, r6.zzzz;
mul r4, r4, c31;
add r4, r4, c32;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
// Calc our filter (see above).
mul r11, v5.wwww, c29;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c16.zzzz;
// Smooth the approach to the shore.
sub r10.x, r6.z, c30.w; // r10.x = height
mul r10.x, r10.x, r10.x; // r10.x = h^2
mul r10.x, r10.x, c10.x; // r10.x = -h^2 * k1 / k2^2
add r10.x, r10.x, c10.y; // r10.x = k1 + -h^2 * k1 / k2^2
max r10.x, r10.x, c16.xxxx; // Clamp to >= zero
add r8.x, r8.x, r10.x; // r8.x += del
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c30.w;
max r6.z, r6.z, r8.z;
add r6.z, r6.z, c12.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c5;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c7;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c16.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c8
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c9
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c16.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c12.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// mul r6.z, r6.z, r10.xxxx; DEBUG
// mad r6, r11, c12.yyzz, r6;
// accumNorm = mul (accumNorm, kScrunchScale ); // kScrunchScale = (scrunchScale, scrunchScale, 1, 1);
// accumCos *= (scrunchScale, scrunchScale, 0, 0);
//##mul r2.x, r6.z, c12.x;
//##add r2.x, r2.x, c16.z;
//##mul r7.xy, r7.xy, r2.xx;
// This is actually wrong, but useful right now for visualizing the generated coords.
// See below for correct version.
//##sub r3, c16.xxzx, r7.xyzz;
// Normalize?
// Now rotate our normal vector into the wind
//##dp3 r0.x, r3, c18.xyww;
//##dp3 r0.y, r3, c18.zxww;
//##mov r3.xy, r0;
// Initialize r0.w
mov r0.w, c16.zzzz;
//##dp3 r0.x, r3, r3;
//##rsq r0.x, r0.x;
//##mul r3, r3, r0.xxxw;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c25; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c11.x;
mul oFog, r10.x, c11.y;
mov oPos, r9;
// Color
mul oD0, c4, v5.xxxx;
// UVW0
// This layer just stays put. The motion's in the texture
// U = transformed U
// V = transformed V
dp4 r0.x, v7, c19;
dp4 r0.y, v7, c20;
//mul r0.y, r0.y, -c16.z;
//add r0.y, r0.y, c16.z;
//add r0.y, r0.y, c16.z;
//add r0.y, r0.y, c16.y;
mov oT0, r0.xyww;
mov oT1, r0.xyww;
mov oT2, r0.xyww;

View File

@ -0,0 +1,203 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c25; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c30 = waterlevel + offset
// c31 = (maxAtten - minAtten) / depthFalloff
// c32 = minAtten.
// And in particular:
// c30.w = waterlevel
// c31.w = 1.f;
// c32.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c30, r6.zzzz;
mul r4, r4, c31;
add r4, r4, c32;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
// Calc our filter (see above).
mul r11, v5.wwww, c29;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c16.zzzz;
// Smooth the approach to the shore.
/*
sub r10.x, r6.z, c30.w; // r10.x = height
mul r10.x, r10.x, r10.x; // r10.x = h^2
mul r10.x, r10.x, c10.x; // r10.x = -h^2 * k1 / k2^2
add r10.x, r10.x, c10.y; // r10.x = k1 + -h^2 * k1 / k2^2
max r10.x, r10.x, c16.xxxx; // Clamp to >= zero
add r8.x, r8.x, r10.x; // r8.x += del
*/
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c30.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c17 = k Dir.x A
// c18 = k Dir.y A
// S = sum(cosDist * c17);
dp4 r7.x, r1, c17;
dp4 r7.y, r1, c18;
add r6.xy, r6.xy, r7.xy;
// Initialize r0.w
mov r0.w, c16.zzzz;
//##dp3 r0.x, r3, r3;
//##rsq r0.x, r0.x;
//##mul r3, r3, r0.xxxw;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c25; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c11.x;
mul oFog, r10.x, c11.y;
mov oPos, r9;
// Color
mul oD0, c4, v5.xxxx;
// UVW0
// This layer just stays put. The motion's in the texture
// U = transformed U
// V = transformed V
dp4 r0.x, v7, c19;
dp4 r0.y, v7, c20;
//mul r0.y, r0.y, -c16.z;
//add r0.y, r0.y, c16.z;
//add r0.y, r0.y, c16.z;
//add r0.y, r0.y, c16.y;
mov oT0, r0.xyww;
mov oT1, r0.xyww;
mov oT2, r0.xyww;

View File

@ -0,0 +1,207 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c4;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c6;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c13.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c7
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c8
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c13.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c9.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;

View File

@ -0,0 +1,189 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c30 = k Dir.x A
// c31 = k Dir.y A
// S = sum(cosDist * c30);
dp4 r7.x, r1, c30;
// R = sum(cosDist * c31);
dp4 r7.y, r1, c31;
add r6.xy, r6.xy, r7.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;

View File

@ -0,0 +1,209 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c4;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c6;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c13.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c7
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c8
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c13.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c9.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
dp4 r11.x, v7, c16;
dp4 r11.y, v7, c17;
mov oT1, r11;

View File

@ -0,0 +1,191 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c30 = k Dir.x A
// c31 = k Dir.y A
// S = sum(cosDist * c30);
dp4 r7.x, r1, c30;
// R = sum(cosDist * c31);
dp4 r7.y, r1, c31;
add r6.xy, r6.xy, r7.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
dp4 r11.x, v7, c16;
dp4 r11.y, v7, c17;
mov oT1, r11;

View File

@ -0,0 +1,210 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
dcl_texcoord1 v8
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c4;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c6;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c13.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c7
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c8
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c13.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c9.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
dp4 r11.x, v8, c16;
dp4 r11.y, v8, c17;
mov oT1, r11;

View File

@ -0,0 +1,192 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
dcl_texcoord1 v8
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c30 = k Dir.x A
// c31 = k Dir.y A
// S = sum(cosDist * c30);
dp4 r7.x, r1, c30;
// R = sum(cosDist * c31);
dp4 r7.y, r1, c31;
add r6.xy, r6.xy, r7.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c18; // HACKAGE
//mov r6.w, c13.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
mov oPos, r9;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;
// Usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
dp4 r11.x, v8, c16;
dp4 r11.y, v8, c17;
mov oT1, r11;

View File

@ -0,0 +1,298 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
dcl_texcoord1 v8
dcl_texcoord2 v9
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c4;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c6;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c13.xxxz;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c7
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c8
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c13.xxzx;
add r11, r11, r7.xyzz;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c9.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
//mov oFog.x, c13.y;
mov oPos, r9;
// Calculate our normal scrunch and apply to our cosines.
mul r2.x, r6.z, c9.x;
add r2.x, r2.x, c13.z;
mul r2.x, r2.x, r4.z;
mul r7.xy, r7.xy, r2.xx;
// Now onto texture coordinate generation.
//
// First is the usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
// Calculate our basis vectors as input into our tex3x3vspec
// This would be like:
//add r1, c13.zxxx, r7.zzxz;
//add r2, c13.xzxx, r7.zzyz;
//sub r3, c13.xxzz, r7.xyzz;
// BUT =>
// Now r1-r3 are surface2world, but we still need to fold
// in texture2surface. That's imbedded in our uv's v8,v9, plus
// the normal we just computed into r11.
// So the full matrix multiply surface2world * texture2surface would be:
// | r1.v8 r1.v9 r1.(0,0,1) |
// | r2.v8 r2.v9 r2.(0,0,1) |
// | r3.v8 r3.v9 r3.(0,0,1) |
// But we notice that
// r1 = (1, 0, r7.x)
// r2 = (0, 1, r7.y)
// r3 = (-r7.x, -r7.y, 1)
// and also:
// r7.z == v8.z == v9.z == 0
// and r7.w == 1.0
//
// Considering the zeros, and doing the matrix multiply by hand, we get
// the final matrix of
// | v8.x v9.x r7.x |
// | v8.y v9.y r7.y |
// | -dp3(r7,v8) -dp3(r7,v9) 1 |
// So we wind up not needing r1-r3 at all
add r1, v8.xzzz, r7.zzxw;
mov r1.y, v9.x;
add r2, v8.yzzz, r7.zzxw;
mov r2.y, v9.y;
dp3 r3.x, -r7, v8;
dp3 r3.y, -r7, v9;
mov r3.zw, r7.ww;
// Following section is debug only to skip the per-vert tangent space axes.
//add r1, c13.zxxx, r7.zzxw;
//add r2, c13.xzxx, r7.zzyw;
//
//mov r3.x, -r7.x;
//mov r3.y, -r7.y;
//mov r3.zw, c13.zz;
// See vs_WaveFixedFin6.inl for derivation of the following
sub r0, r6, c27; // c27 is camera position.
dp3 r10.x, r0, r0;
rsq r10.x, r10.x;
mul r0, r0, r10.xxxx;
dp3 r10.x, r0, c28; // c28 is kEnvAdjust
mad r10.y, r10.x, r10.x, -c28.w;
rsq r9.x, r10.y;
mad r10.z, r10.y, r9.x, r10.x;
mad r0.xyz, r0, r10.zzz, -c28.xyz;
mov r1.w, -r0.x;
mov r2.w, -r0.y;
mov r3.w, -r0.z;
// Now r1-r3 are texture2world, with the eye-ray vector in .w. We just
// need to normalize them and bung them into output UV's 1-3.
// Note we're accounting for our environment map being flipped from
// D3D (and all rational thought) by putting r2 into UV3 and r3 into UV2.
mov r10.w, c13.z;
dp3 r10.x, r1, r1;
rsq r10.x, r10.x;
mul oT1, r1, r10.xxxw;
dp3 r10.x, r3, r3;
rsq r10.x, r10.x;
mul oT2, r3, r10.xxxw;
//mul oT3, r3, r10.xxxw; // YZHACK
dp3 r10.x, r2, r2;
rsq r10.x, r10.x;
mul oT3, r2, r10.xxxw;
//mul oT2, r2, r10.xxxw;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;

View File

@ -0,0 +1,331 @@
vs.1.0
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
dcl_texcoord1 v8
dcl_texcoord2 v9
// Store our input position in world space in r6
m4x3 r6, v0, c18; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c13.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = illumination
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c22 = waterlevel + offset
// c23 = (maxAtten - minAtten) / depthFalloff
// c24 = minAtten.
// And in particular:
// c22.w = waterlevel
// c23.w = 1.f;
// c24.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c7, r6.xxxx;
mad r0, c8, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c4;
add r0, r0, c5;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c12.wwww;
add r0, r0, c12.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c12.wwww;
// dist += -kPi;
sub r0, r0, c12.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c11.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c10.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c11.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c10.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c11.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c10.wwww, r2;
mad r1, r4, c11.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c22, r6.zzzz;
mul r4, r4, c23;
add r4, r4, c24;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c13.zzzz;
max r4.xyz, r4, c13.xxxx;
//mov r4.xyz, c13.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c21;
max r11, r11, c13.xxxx;
min r11, r11, c13.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c6;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c13.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c22.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c30 = k Dir.x A
// c31 = k Dir.y A
// S = sum(cosDist * c30);
dp4 r7.x, r1, c30;
// R = sum(cosDist * c31);
dp4 r7.y, r1, c31;
add r6.xy, r6.xy, r7.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c25.x, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c25.x;
//
// // Transform position to screen
//
//
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c29.x;
mul oFog, r10.x, c29.y;
//mov oFog, c13.y;
mov oPos, r9;
// Now onto texture coordinate generation.
//
// First is the usual texture transform
mov r11.zw, c13.zzzz;
dp4 r11.x, v7, c14;
dp4 r11.y, v7, c15;
mov oT0, r11;
// Calculate our basis vectors as input into our tex3x3vspec
// First we get our basis set off our surface. This is
// Okay, here we go:
// W == sum(k w Dir.x^2 A sin()) x
// V == sum(k w Dir.x Dir.y A sin()) x
// U == sum(k w Dir.y^2 A sin()) x
//
// T == sum(A sin())
//
// S == sum(k Dir.x A cos())
// R == sum(k Dir.y A cos())
//
// Q == sum(k w A cos()) x
//
// M == sum(A cos())
//
// P == sum(w Dir.x A cos()) x
// N == sum(w Dir.y A cos()) x
//
// Then:
// Pos = (in.x + S, in.y + R, waterheight + T) // Already done above.
//
// Bin = (1 - W, -V, P)
// Tan = (-V, 1 - U, N)
// Nor = (-P, -N, 1 - Q)
//
// The matrix
// |Bx, Tx, Nx|
// |By, Ty, Ny|
// |Bz, Tz, Nz|
// is surface2world, but we still need to fold in
// texture2surface. We'll go with the generalized
// (not assuming a flat surface) partials of dPos/dU and dPos/dV
// as coming in as uv coords v8 and v9.
// Then, if r5 = v8 X v9, then texture to surface is
// |v8.x, v9.x, r5.x|
// |v8.y, v9.y, r5.y|
// |v8.z, v9.z, r5.z|
//
// So, let's say we calc 3 vectors,
// r7 = (Bx, Tx, Nx)
// r8 = (By, Ty, Ny)
// r9 = (Bz, Tz, Nz)
//
// Then surface2world * texture2surface =
// |r7 dot v8, r7 dot v9, r7 dot r5|
// |r8 dot v8, r8 dot v9, r8 dot r5|
// |r9 dot v8, r9 dot v9, r9 dot r5|
//
// We will need r5 as v8 X v9
mov r7, v8;
mul r5.xyz, r7.yzx, v9.zxy;
mad r5.xyz, r7.zxy, -v9.yzx, r5.xyz;
// Okay, r1 currently has the vector of cosines, and r2 has vector of sines.
// Everything will want that times amplitude, so go ahead and fold that in.
mul r1, r1, c6; // r1 = A cos() = M
// Sines already have amplitude folded in, so r2 = A sin() = T.
// Now just compute r7-9 one element at a time.
dp4 r7.x, r2, -c35; // r7.x = -W
dp4 r7.y, r2, -c36; // r7.y = -V
dp4 r7.z, r1, -c32; // r7.z = -P
add r7.x, r7.x, c13.z; // r7.x = 1 - W;
dp4 r8.x, r2, -c36; // r8.x = -V
dp4 r8.y, r2, -c37; // r8.y = -U
dp4 r8.z, r1, -c33; // r8.z = -N
add r8.y, r8.y, c13.z; // r8.y = 1 - U
dp4 r9.z, r2, -c34; // r9.z = -Q
mov r9.x, -r7.z; // r9.x = P = -r7.z
mov r9.y, -r8.z; // r9.y = N = -r8.z
add r9.z, r9.z, c13.z; // r9.z = 1 - Q
// Okay, got everything we need, construct r1-3 as surface2world*texture2surface.
dp3 r1.x, r7, v8;
dp3 r1.y, r7, v9;
dp3 r1.z, r7, r5;
dp3 r2.x, r8, v8;
dp3 r2.y, r8, v9;
dp3 r2.z, r8, r5;
dp3 r3.x, r9, v8;
dp3 r3.y, r9, v9;
dp3 r3.z, r9, r5;
// Following section is debug only to skip the per-vert tangent space axes.
//add r1, c13.zxxx, r7.zzxw;
//add r2, c13.xzxx, r7.zzyw;
//
//mov r3.x, -r7.x;
//mov r3.y, -r7.y;
//mov r3.zw, c13.zz;
// See vs_WaveFixedFin6.inl for derivation of the following
sub r0, r6, c27; // c27 is camera position.
dp3 r10.x, r0, r0;
rsq r10.x, r10.x;
mul r0, r0, r10.xxxx;
dp3 r10.x, r0, c28; // c28 is kEnvAdjust
mad r10.y, r10.x, r10.x, -c28.w;
rsq r9.x, r10.y;
mad r10.z, r10.y, r9.x, r10.x;
mad r0.xyz, r0, r10.zzz, -c28.xyz;
// ATI 9000 is having trouble with eyeVec as computed. Normalizing seems to get it over the hump.
dp3 r10.x, r0, r0;
rsq r9.x, r10.x;
mul r0.xyz, r0.xyz, r9.xxx;
mov r1.w, -r0.x;
mov r2.w, -r0.y;
mov r3.w, -r0.z;
// Now r1-r3 are texture2world, with the eye-ray vector in .w. We just
// need to normalize them and bung them into output UV's 1-3.
// Note we're accounting for our environment map being flipped from
// D3D (and all rational thought) by putting r2 into UV3 and r3 into UV2.
mov r10.w, c13.z;
dp3 r10.x, r1, r1;
rsq r10.x, r10.x;
mul oT1, r1, r10.xxxw;
dp3 r10.x, r3, r3;
rsq r10.x, r10.x;
mul oT2, r3, r10.xxxw;
//mul oT3, r3, r10.xxxw; // YZHACK
dp3 r10.x, r2, r2;
rsq r10.x, r10.x;
mul oT3, r2, r10.xxxw;
//mul oT2, r2, r10.xxxw;
// Output color is vertex green
// Output alpha is vertex red (vtx alpha is used for wave filtering)
// Whole thing modulated by material color/opacity.
mul oD0, v5.yyyx, c26;

View File

@ -0,0 +1,449 @@
vs.1.1
dcl_position v0
dcl_color v5
// Store our input position in world space in r6
m4x3 r6, v0, c21; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.zzzz;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c25 = waterlevel + offset
// c26 = (maxAtten - minAtten) / depthFalloff
// c27 = minAtten.
// And in particular:
// c25.w = waterlevel
// c26.w = 1.f;
// c27.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c25, r6.zzzz;
mul r4, r4, c26;
add r4, r4, c27;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
// Calc our filter (see above).
mul r11, v5.wwww, c24;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c16.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c25.w;
max r6.z, r6.z, r8.z; // CLAMP
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c5;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c7;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c16.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c8
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c9
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c16.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// // Scrunch in based on computed (normalized) normal
// temp = mul( accumNorm, kNegScrunchScale ); // kNegScrunchScale = (-scrunchScale, -scrunchScale, 0, 0);
// accumPos += temp;
//dp3 r10.x, r11, c18.zxw; // winddir.x, winddir.y, 0, 0 // NUKE
// r10.x tells us whether our normal is opposed to the wind.
// If opposed, r10.x = 0, else r10.x = 1.f;
// We'll use this to kill the Scrunch on the back sides of waves.
// We use it for position right here, and then again for the
// normal just down a bit further.
//slt r10.x, r10.x, c16.x; // NUKE
//mov r10.x, c16.z; // HACKAGE NUKE
//mul r9, r10.xxxx, r11; // NUKE
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c12.y, r4.z;
//mov r10.x, c12.y; // NUKETEST TAKEOUT
mad r6.xy, r11.xy, r10.xx, r6.xy;
// mul r6.z, r6.z, r10.xxxx; DEBUG
// mad r6, r11, c12.yyzz, r6;
// accumNorm = mul (accumNorm, kScrunchScale ); // kScrunchScale = (scrunchScale, scrunchScale, 1, 1);
// accumCos *= (scrunchScale, scrunchScale, 0, 0);
mul r2.x, r6.z, c12.x;
//mad r2.x, r2.x, r10.x, c16.z; NUKE
add r2.x, r2.x, c16.z;
mul r2.x, r2.x, r4.z; // HACKAGE // NUKETEST BACKIN
// mul r7, r7, c12.xxzz;
mul r7.xy, r7.xy, r2.xx;
// This is actually wrong, but useful right now for visualizing the generated coords.
// See below for correct version.
sub r3, c16.xxzz, r7.xyzz;
//mov oD0, r3; // SEENORM
dp3 r8.x, r3, c18.zxww; // WAVEFACE
mul r8.x, r8.x, c12.w; // WAVEFACE
max r8.x, r8.x, c16.x; // WAVEFACE
min r8.x, r8.x, c16.z; // WAVEFACE
//mov r9.x, c12.z;
//add r9.x, r9.x, -c16.z;
//mad r8.x, r9.x, r8.x, c16.z; // WAVEFACE
mul r8.x, r8.x, -c16.z;
add r8.x, r8.x, c16.z;
// Normalize?
// We can either calculate an orthonormal basis from the
// computed normal, with Binormal = (0,1,0) X Normal, Tangent = Normal X (1,0,0),
// or compute our basis directly from the partial derivatives, with
// Binormal = (1, 0, -cosX), Tangent = (0, 1, -cosY), Normal = (cosX, cosY, 1)
//
// These work out to identically the same result, so we'll compute directly
// from the partials because it takes 2 fewer instructions.
//
// Note that our basis is NOT orthonormal. The Normal is equal to
// Binormal X Tangent, but Dot(Binormal, Tangent) != 0. The Binormal and Tangents
// are both correct tangents to the surface, and their projections on the XY plane
// are 90 degrees apart, but in 3-space, they are not orthogonal. Practical implications?
// Not really. I'm actually not really sure which is more "proper" for bump mapping.
//
// Note also that we add when we should subtract and subtract when we should
// add, so that r1, r2, r3 aren't Binormal, Tangent, Normal, but the rows
// of our transform, (Bx, Tx, Nx), (By, Ty, Ny), (Bz, Tz, Nz). See below for
// explanation.
//
// Binormal = Y % Normal
// Cross product3 is:
// mul res.xyz, a.yzx, b.zxy
// mad res.xyz, -a.zxy, b.yzx, res.xyz
// mul r1.xyz, c16.zxx, r3.zxy;
// mad r1.xyz, -c16.xxz, r3.yzx, r1.xyz;
// Tangent = Normal % X
// mul r2.xyz, r3.yzx, c16.xzx;
// mad r2.xyz, -r3.zxy, c16.xxz, r2;
add r1, c16.zxxx, r7.zzxz;
add r2, c16.xzxx, r7.zzyz;
// Note that we're swapping z and y to match our environment map tools in max.
// We do this through our normal map transform (oT1, oT2, oT3), making it
// a concatenation of:
//
// rotate about Z (blue) to turn our map into the wind
// windRot = | dirY -dirX 0 |
// | dirX dirY 0 |
// | 0 0 1 |
//
// swap our Y and Z axes to match our environment map
// swapYZ = | 1 0 0 |
// | 0 0 1 |
// | 0 1 0 |
//
// rotate the normal into the surface's tangent space basis
// basis = | Bx Tx Nx |
// | By Ty Ny |
// | Bz Tz Nz |
//
// Note that we've constucted the basis by taking advantage of the
// matrix being a pure rotation, as noted below, so r1, r2 and r3
// are actually constructed as:
// basis = | Bx -By -Bz |
// | -Tx Ty -Tz |
// | -Nx -Ny -Nz |
//
// Then the final normal map transform is:
//
// basis * swapYZ * windRot [ * normal ]
// sub r1.w, c17.x, r6.x;
// sub r2.w, c17.z, r6.z;
// sub r3.w, c17.y, r6.y;
// Big note here. All this math can blow up if the camera position
// is outside the environment sphere. It's assumed that's dealt
// with in the app setting up the constants. For that reason, the
// camera position used here might not be the real local camera position,
// which is needed for the angular attenuation, so we burn another constant
// with our pseudo-camera position. To restrain the pseudo-camera from
// leaving the sphere, we make:
// pseudoPos = envCenter + (realPos - envCenter) * dist * R / (dist + R)
// where dist = |realPos - envCenter|
// So, our "finitized" eyeray is:
// camPos + D * t - envCenter = D * t - (envCenter - camPos)
// with
// D = (pos - camPos) / |pos - camPos| // normalized usual eyeray
// and
// t = D dot F + sqrt( (D dot F)^2 - G )
// with
// F = (envCenter - camPos) => c19.xyz
// G = F^2 - R^2 => c19.w
// R = environment radius. => unused
//
// This all derives from the positive root of equation
// (camPos + (pos - camPos) * t - envCenter)^2 = R^2,
// In other words, where on a sphere of radius R centered about envCenter
// does the ray from the real camera position through this point hit.
//
// Note that F, G, and R are all constants (one point, two scalars).
//
// So first we calculate D into r0,
// then D dot F into r10.x,
// then (D dot F)^2 - G into r10.y
// then rsq( (D dot F)^2 - G ) into r9.x;
// then t = r10.z = r10.x + r10.y * r9.x;
// and
// r0 = D * t - (envCenter - camPos)
// = r0 * r10.zzzz - F;
//
sub r0, r6, c17;
dp3 r10.x, r0, r0;
rsq r10.x, r10.x;
mul r0, r0, r10.xxxx; // r0 = D
dp3 r10.x, r0, c19; // r10.x = D dot F
mad r10.y, r10.x, r10.x, -c19.w; // r10.y = (D dot F)^2 - G
rsq r9.x, r10.y; // r9.x = 1/SQRT((D dot F)^2 - G)
mad r10.z, r10.y, r9.x, r10.x; // r10.z = D dot F + SQRT((D dot F)^2 - G)
mad r0.xyz, r0, r10.zzz, -c19.xyz; // r0.xyz = D * t - (envCenter - camPos)
mov r1.w, -r0.x;
mov r2.w, -r0.y;
mov r3.w, -r0.z;
// Now rotate our basis vectors into the wind
// This should be redone, and put our wind direction into
// the water texture.
dp3 r0.x, r1, c18.xyww;
dp3 r0.y, r1, c18.zxww;
mov r1.xy, r0;
dp3 r0.x, r2, c18.xyww;
dp3 r0.y, r2, c18.zxww;
mov r2.xy, r0;
dp3 r0.x, r3, c18.xyww;
dp3 r0.y, r3, c18.zxww;
mov r3.xy, r0;
mov r0.zw, c16.zzxz;
dp3 r0.x, r1, r1;
rsq r0.x, r0.x;
mul oT1, r1.xyzw, r0.xxxw;
// mul r8, r1.xyzw, r0.xxxw; // VISUAL
dp3 r0.x, r2, r2;
rsq r0.x, r0.x;
mul oT3, r2.xyzw, r0.xxxw;
// mul r9, r2.xyzw, r0.xxxw; // VISUAL
dp3 r0.x, r3, r3;
rsq r0.x, r0.x;
mul oT2, r3.xyzw, r0.xxxw;
// mul r9, r3.xyzw, r0.xxxw; // VISUAL
// mul r3, r3.xzyw, r0.xxxw;
// mul r3.xy, r3, -c16.zzzz;
/*
// Want:
// oT1 = (BIN.x, TAN.x, NORM.x, view2pos.x)
// oT2 = (BIN.y, TAN.y, NORM.y, view2pos.y)
// ot3 = (BIN.z, TAN.z, NORM.z, view2pos.z)
// with BIN, TAN, and NORM normalized.
// Unnormalized, we have
// BIN = (1, 0, -r7.x) where r7 == accumCos
// TAN = (0, 1, -r7.y)
// NORM= (r7.x, r7.y, 1)
// So, unnormalized, we have
// oT1 = (1, 0, r7.x, view2pos.x)
// oT2 = (0, 1, r7.y, view2pos.y)
// oT3 = (-r7.x, -r7.y, 1, view2pos.z)
// which is just reversing the signs on the accumCos
// terms above. So the normalized version is just
// reversing the signs on the normalized version above.
*/
//mov oT3, r4;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c21; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c28.x;
mul oFog, r10.x, c28.y;
//mov oFog, c16.y; // TESTFOGHACK
mov oPos, r9;
mov oD0, c4; // SEENORM
// Transform our uvw
dp4 r0.x, v0, c10;
dp4 r0.y, v0, c11;
//mov r0.zw, c16.xxxz;
mov oT0, r0
// Questionble attenuation follows
// Find vector from this point to camera and normalize
sub r0, c17, r6;
dp3 r1.x, r0, r0;
rsq r1.x, r1.x;
mul r0, r0, r1.xxxx;
// Dot that with the computed normal
dp3 r1.x, r0, r11;
mul r1.x, r1.x, v5.z;
// dp3 r1.x, r0, r3; // if you want the adjusted normal, you'll need to normalize/swizzle r3
// Map dot=1 => 0, dot=0 => 1
sub r1.xyzw, c16.zzzz, r1.xxxx;
add r1.w, r1.wwww, c16.zzzz;
mul r1.w, r1.wwww, c16.yyyy;
// No need to clamp, since the destination register (in the pixel shader)
// will saturate [0..1] anyway.
//%%% mul r1.w, r1.w, r4.x;
//%%% mul r1.xyz, r1.xyz, r4.yyy;
mul r1, r1, r4.yyyx; // HACKTESTCOLOR
mul r1.xyz, r1, r8.xxx; // WAVEFACE
mul r1.w, r1.wwww, v5.xxxx;
mul oD1, r1, c20;
// mov oD1, r4.yyyy;
//mov oD1, c16.zzzz; // HACKAGE
// mov oD1, r9;
// mov oD1, r8.xzyw;

View File

@ -0,0 +1,437 @@
vs.1.1
dcl_position v0
dcl_color v5
// Store our input position in world space in r6
m4x3 r6, v0, c21; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.zzzz;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c25 = waterlevel + offset
// c26 = (maxAtten - minAtten) / depthFalloff
// c27 = minAtten.
// And in particular:
// c25.w = waterlevel
// c26.w = 1.f;
// c27.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c25, r6.zzzz;
mul r4, r4, c26;
add r4, r4, c27;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
// Calc our filter (see above).
mul r11, v5.wwww, c24;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r5, r2, c7;
// r5 is now T = sum(Ai * sin())
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r5, c16.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c25.w;
max r6.z, r6.z, r8.z; // CLAMP
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kAmplitude.xyzw; // Combine?
mul r7, r1, c7;
// cosDist *= filter;
mul r7, r7, r11;
// r7 is now M = sum(Ai * cos())
// Okay, here we go:
// W == sum(k w Dir.x^2 A sin())
// V == sum(k w Dir.x Dir.y A sin())
// U == sum(k w Dir.y^2 A sin())
//
// T == sum(A sin())
//
// S == sum(k Dir.x A cos())
// R == sum(k Dir.y A cos())
//
// Q == sum(k w A cos())
//
// M == sum(A cos())
//
// P == sum(w Dir.x A cos())
// N == sum(w Dir.y A cos())
//
// Then:
// Pos = (in.x + S, in.y + R, waterheight + T)
//
// Bin = (1 - W, -V, P)
// Tan = (-V, 1 - U, N)
// Nor = (-P, -N, 1 - Q)
//
// But we want the transpose of that to go into r1-r3
dp4 r10.x, r7, c29;
add r6.x, r6.x, r10.x;
dp4 r10.x, r7, c30;
add r6.y, r6.y, r10.x;
dp4 r1.x, r5, -c34;
dp4 r2.x, r5, -c35;
dp4 r3.x, r7, c31;
add r1.x, r1.xxxx, c16.zzzz;
dp4 r1.y, r5, -c35;
dp4 r2.y, r5, -c36;
dp4 r3.y, r7, c32;
add r2.y, r2.yyyy, c16.zzzz;
dp4 r1.z, r7, -c31;
dp4 r2.z, r7, -c32;
dp4 r3.z, r5, -c33;
add r3.z, r3.zzzz, c16.zzzz;
// Calculate our normalized vector from camera to vtx.
// We'll use that a couple of times coming up.
sub r5, r6, c17;
dp3 r10.x, r5, r5;
rsq r10.x, r10.x;
mul r5, r5, r10.xxxx; // r0 = D
rcp r5.w, r10.x;
// Calculate our specular attenuation from and into r5.w.
// r5.w starts off the distance from vtx to camera.
// Once we've turned it into an attenuation factor, we
// scale the x and y of our normal map (through the transform bases)
// so that in the distance, the normal map is flat. Note that the
// geometry in the distance isn't necessarily flat. We want to apply
// this scale to the normal read from the normal map before it is
// transformed into surface space.
add r5.w, r5.w, c11.x;
mul r5.w, r5.w, c11.y;
min r5.w, r5.w, c16.z;
max r5.w, r5.w, c16.x;
mul r5.w, r5.w, r5.w; // Square it to account for perspective
mul r5.w, r5.w, c11.z;
// Normalize?
// We can either calculate an orthonormal basis from the
// computed normal, with Binormal = (0,1,0) X Normal, Tangent = Normal X (1,0,0),
// or compute our basis directly from the partial derivatives, with
// Binormal = (1, 0, -cosX), Tangent = (0, 1, -cosY), Normal = (cosX, cosY, 1)
//
// These work out to identically the same result, so we'll compute directly
// from the partials because it takes 2 fewer instructions.
//
// Note that our basis is NOT orthonormal. The Normal is equal to
// Binormal X Tangent, but Dot(Binormal, Tangent) != 0. The Binormal and Tangents
// are both correct tangents to the surface, and their projections on the XY plane
// are 90 degrees apart, but in 3-space, they are not orthogonal. Practical implications?
// Not really. I'm actually not really sure which is more "proper" for bump mapping.
//
// Note also that we add when we should subtract and subtract when we should
// add, so that r1, r2, r3 aren't Binormal, Tangent, Normal, but the rows
// of our transform, (Bx, Tx, Nx), (By, Ty, Ny), (Bz, Tz, Nz). See below for
// explanation.
//
// Binormal = Y % Normal
// Cross product3 is:
// mul res.xyz, a.yzx, b.zxy
// mad res.xyz, -a.zxy, b.yzx, res.xyz
// mul r1.xyz, c16.zxx, r3.zxy;
// mad r1.xyz, -c16.xxz, r3.yzx, r1.xyz;
// Tangent = Normal % X
// mul r2.xyz, r3.yzx, c16.xzx;
// mad r2.xyz, -r3.zxy, c16.xxz, r2;
//mad r1, r5.wwww, c16.zxxx, r7.zzxz;
//mad r2, r5.wwww, c16.xzxx, r7.zzyz;
//mul r3.xy, r3.xy, r5.wwww;
// Note that we're swapping z and y to match our environment map tools in max.
// We do this through our normal map transform (oT1, oT2, oT3), making it
// a concatenation of:
//
// rotate about Z (blue) to turn our map into the wind
// windRot = | dirY -dirX 0 |
// | dirX dirY 0 |
// | 0 0 1 |
//
// swap our Y and Z axes to match our environment map
// swapYZ = | 1 0 0 |
// | 0 0 1 |
// | 0 1 0 |
//
// rotate the normal into the surface's tangent space basis
// basis = | Bx Tx Nx |
// | By Ty Ny |
// | Bz Tz Nz |
//
// Note that we've constucted the basis by taking advantage of the
// matrix being a pure rotation, as noted below, so r1, r2 and r3
// are actually constructed as:
// basis = | Bx -By -Bz |
// | -Tx Ty -Tz |
// | -Nx -Ny -Nz |
//
// Then the final normal map transform is:
//
// basis * swapYZ * windRot [ * normal ]
// sub r1.w, c17.x, r6.x;
// sub r2.w, c17.z, r6.z;
// sub r3.w, c17.y, r6.y;
// Big note here. All this math can blow up if the camera position
// is outside the environment sphere. It's assumed that's dealt
// with in the app setting up the constants. For that reason, the
// camera position used here might not be the real local camera position,
// which is needed for the angular attenuation, so we burn another constant
// with our pseudo-camera position. To restrain the pseudo-camera from
// leaving the sphere, we make:
// pseudoPos = envCenter + (realPos - envCenter) * dist * R / (dist + R)
// where dist = |realPos - envCenter|
// So, our "finitized" eyeray is:
// camPos + D * t - envCenter = D * t - (envCenter - camPos)
// with
// D = (pos - camPos) / |pos - camPos| // normalized usual eyeray
// and
// t = D dot F + sqrt( (D dot F)^2 - G )
// with
// F = (envCenter - camPos) => c19.xyz
// G = F^2 - R^2 => c19.w
// R = environment radius. => unused
//
// This all derives from the positive root of equation
// (camPos + (pos - camPos) * t - envCenter)^2 = R^2,
// In other words, where on a sphere of radius R centered about envCenter
// does the ray from the real camera position through this point hit.
//
// Note that F, G, and R are all constants (one point, two scalars).
//
// So first we calculate D into r0,
// then D dot F into r10.x,
// then (D dot F)^2 - G into r10.y
// then rsq( (D dot F)^2 - G ) into r9.x;
// then t = r10.z = r10.x + r10.y * r9.x;
// and
// r0 = D * t - (envCenter - camPos)
// = r0 * r10.zzzz - F;
//
mov r0, r5; // r0 = D
dp3 r10.x, r0, c19; // r10.x = D dot F
mad r10.y, r10.x, r10.x, -c19.w; // r10.y = (D dot F)^2 - G
rsq r9.x, r10.y; // r9.x = 1/SQRT((D dot F)^2 - G)
mad r10.z, r10.y, r9.x, r10.x; // r10.z = D dot F + SQRT((D dot F)^2 - G)
mad r0.xyz, r0, r10.zzz, -c19.xyz; // r0.xyz = D * t - (envCenter - camPos)
// ATI 9000 is having trouble with eyeVec as computed. Normalizing seems to get it over the hump.
dp3 r10.x, r0, r0;
rsq r9.x, r10.x;
mul r0.xyz, r0.xyz, r9.xxx;
mov r1.w, -r0.x;
mov r2.w, -r0.y;
mov r3.w, -r0.z;
mov r0.zw, c16.zzxz;
dp3 r0.x, r1, r1;
rsq r0.xy, r0.x;
mul r0.x, r0.x, r5.w;
mul oT1, r1.xyzw, r0.xxyw;
// mul r8, r1.xyzw, r0.xxxw; // VISUAL
mul r11.x, r1.z, r0.y;
dp3 r0.x, r2, r2;
rsq r0.xy, r0.x;
mul r0.x, r0.x, r5.w;
mul oT3, r2.xyzw, r0.xxyw;
// mul r9, r2.xyzw, r0.xxxw; // VISUAL
mul r11.y, r2.z, r0.y;
dp3 r0.x, r3, r3;
rsq r0.xy, r0.x;
mul r0.x, r0.x, r5.w;
mul oT2, r3.xyzw, r0.xxyw;
// mul r9, r3.xyzw, r0.xxxw; // VISUAL
mul r11.z, r3.z, r0.y;
/*
// Want:
// oT1 = (BIN.x, TAN.x, NORM.x, view2pos.x)
// oT2 = (BIN.y, TAN.y, NORM.y, view2pos.y)
// ot3 = (BIN.z, TAN.z, NORM.z, view2pos.z)
// with BIN, TAN, and NORM normalized.
// Unnormalized, we have
// BIN = (1, 0, -r7.x) where r7 == accumCos
// TAN = (0, 1, -r7.y)
// NORM= (r7.x, r7.y, 1)
// So, unnormalized, we have
// oT1 = (1, 0, r7.x, view2pos.x)
// oT2 = (0, 1, r7.y, view2pos.y)
// oT3 = (-r7.x, -r7.y, 1, view2pos.z)
// which is just reversing the signs on the accumCos
// terms above. So the normalized version is just
// reversing the signs on the normalized version above.
*/
//mov oT3, r4;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c21; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c28.x;
mul oFog, r10.x, c28.y;
//mov oFog, c16.zzzz; // TESTFOGHACK
mov oPos, r9;
// Transform our uvw
mul r0.x, v0.xxxx, c10.xxxx;
mul r0.y, v0.yyyy, c10.xxxx;
//mov r0.zw, c16.xxxz;
mov oT0, r0
// Questionble attenuation follows
// vector from this point to camera and normalize stashed in r5
// Dot that with the computed normal
dp3 r1.x, -r5, r11;
mul r1.x, r1.x, v5.z;
// dp3 r1.x, r5, r3; // if you want the adjusted normal, you'll need to normalize/swizzle r3
// Map dot=1 => 0, dot=0 => 1
sub r1.xyzw, c16.zzzz, r1.xxxx;
add r1.w, r1.wwww, c16.zzzz;
mul r1.w, r1.wwww, c16.yyyy;
// No need to clamp, since the destination register (in the pixel shader)
// will saturate [0..1] anyway.
//%%% mul r1.w, r1.w, r4.x;
//%%% mul r1.xyz, r1.xyz, r4.yyy;
mul r1, r1, r4.yyyx; // HACKTESTCOLOR
//mul r1.xyz, r1, r8.xxx; // WAVEFACE
mul r1.w, r1.wwww, v5.xxxx;
mul r1.w, r1.wwww, c4.wwww;
mul oD0, r1, c20;
mov oD1, c4; // SEENORM
//mov oD1, c16.xxxx;
// mov oD1, r4.yyyy;
//mov oD1, c16.zzzz; // HACKAGE
// mov oD1, r9;
// mov oD1, r8.xzyw;

View File

@ -0,0 +1,166 @@
vs.1.1
dcl_position v0
dcl_normal v3
// c0 = (0,0.5,1.0,2.0) (aka NumericConsts)
// c1 = frequencies
// c2 = phases
// c3 = amplitudes
// c4 = PiConsts = (1/(2PI), PI/2, PI, 2*PI) // NOTE THIS IS DIFFERENT
// because we don't need oonsqpi here but do want 1/2Pi.
// c5 = cosConsts = (1.0f, -1.0f/2.0f, 1.0f/ 24.0f, -1.0f/ 720.0f);
// c6 = ((cMax - cMin), cMin, 2ndLayerVOffset, 2ndLayerScale);
// c7 = overall color, including current opacity. Will
// probably only use the opacity, which we could stuff into
// the free slot of c6, but we're a wuss.
// First, "move" the position to oPos
mov r0, v0;
//mov r0.y, -r0.yyyy;
mov r0.w, c0.zzzz;
mov oPos, r0;
// Now the tricky part.
// The base layer defines the shape of the incoming wave
// The next layer has bubbles (noise) and moves in when the
// wave is moving in, moves out when wave is moving out.
// So calculate uvw for first layer, second uvw shares u val
// and v val is const
// The .x component of the normal
// tells us how much to shift this vert based on the
// cumulative cosine wave.
// Figure c = Sigma((cosine(v0.x * freq + phase) + 1) * amp);
// Note that range c must be [0..1]
// Also, c(-1) must equal c(1) so it will wrap.
// That implies freq = k * 2 * PI, where k is an integer.
// To keep c >= 0, we can add 1 to each term in the sigma BEFORE
// modulating by the amplitude.
// That puts our range at [0..2*sigma(amp)], so as long as
// sigma(amp) <= 0.5, we're fine.
// Get our input to cosine value (v0.x * freq + phase).
add r0, v0.xxxx, c0.zzzz;
mul r0, r0, c1;
add r0, r0, c2;
// Get it into range [-Pi..Pi]
// First divide out the 2PI
// add r0, r0, c4.zzzz; HACKOUT
mul r0, r0, c4.xxxx;
// Do an integer mod
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
//mov oD1, r1; // HACKTEST
//mov oD1.w, c0.zzzz; // HACKTEST
// Move back into PI space, w/ *= 2P, -= PI
mul r0, r1, c4.wwww;
sub r0, r0, c4.zzzz;
// Okay, compute cosine here.
// cos = 1 + r0^2 * kCos.y + r0^4 * kCos.Z + r0^6 * kCos.w
// Note: could pare off an instr by putting 1/kCos.w in kCos.x,
// then doing a mad to get r3=(1/kCos.w + r0^6), then mad that
// into the accum by kCos.w to get (1 + r0^6*kCos.x). But who cares.
mul r1, r0, r0; // r0^2
mul r2, r1, r1; // r0^4
mul r3, r1, r2; // r0^6
mov r4, c5.xxxx; // r4 = 1
mad r4, r1, c5.yyyy, r4; // r4 += r0^2 * kCos.y
mad r4, r2, c5.zzzz, r4; // r4 += r0^4 * kCos.z
mad r4, r3, c5.wwww, r4; // r4 += r0^6 * kCos.w
add r4, r4, c0.zzzz; // shift from [-1..1] to [0..2]
//mov r4, c0.xxxx; // HACKLAST
mul r4, r4, c3; // times amplitude
dp4 r5.y, r4, c0.zzzz; // r5.x = sigma((cos() + 1) * amp);
// V calculation, goes something like:
// For layers 0 and 2:
// V = { 1 + c6.z <= r5.y = 0 } * norm.x // norm.x == v3.x
// { 1 + 0 <= r5.y = 1 }
// For layer 1:
// V = (norm.x + c6.z) * c6.w // Scaled like U
//
// Another way to formulate that is
// baseV = cMin + sinAge * (cMax-cMin) where
// cMin = 2
// cMax = 1
// sinAge = color.a = c7.w
// delV = sigma(cos) = r5.y
// Then
// V0 = V2 = (baseV + delV) * v3.x
// V1 = (norm.x + baseV + delV) * c6.w
//
// If we're sure we want cMin = 2 and cMax = 1, then it simplifies to:
// baseV = 2 - sinAge = c0.w - c7.w
// delV = r5.y
// (baseV + delV) = c0.w - c7.w + r5.y
//
// If we want to stay general, then
// baseV = c6.x * c7.w + c6.y
// delV = -r5.y
// (baseV + delV) = constant + r5.y
//
// make r5.y = (baseV + delV)
add r5.y, c6.xxxx, r5.yyyy;
//mov oD1, r5.yyyy; // HACKLAST
//mov oD1.w, c0.zzzz; // HACKLAST
// U is input U (or v0.x * 0.5f + 0.5f)
mul r5.x, v0.x, c0.y;
add r5.x, r5.x, c0.y;
// Fill out wq.
mov r5.zw, c0.xz;
mul oT0, r5, v3.wxww;
// mov oD1, r5.yyyw; // HACKTEST
mul oT2, r5, v3.wxww;
// Second uv shares u, but v is norm.x + c6.x;
// Then we scale it.
// If we want the bubble texture to move with the
// wave front, we want the second UV calc (RESCALE1).
// But it looks better to have the bubbles moving
// slightly faster than the wave front. RESCALE0
// happens to do that, because we're scaling the
// texture by a factor of 2, but we should probably
// supply an independent scale of the motion vs. the
// scale of the texture.
// Let's move c6 to r6 for ease of use.
mov r6, c6;
// add r5.x, r5.x, c6.y;
// add r5.y, c6.xxxx, v3.xxxx; // RESCALE0
// mul r5.xy, r5, c6.wwww; // RESCALE0
add r5.x, r5.x, r6.y; // RESCALE1 // offset U
mov r5.y, v3.xx; // RESCALE1 // Init V to value stashed in normal.x
mul r5.xy, r5, r6.wwww; // RESCALE1 // scale them by single scale value
mad r5.y, r6.xx, r6.zz, r5.yy; // RESCALE1 // add in our scaled V offset (sinage * vScale)
mov oT1, r5;
//mov oT0, v7; // HACKTEST
//mov oT1, v7; // HACKTEST
//mov oT2, v7; // HACKTEST
// Just slam in the constant color (includes our current opacity).
mov oD0, c7;
//mov oD0, c0.zzzz; // HACKTEST

View File

@ -0,0 +1,471 @@
vs.1.1
dcl_position v0
//m4x4 oPos, v0, c0
/*
In fact, I was trying to understand how it was possible to expand FRC into 4
instructions...
Actually, I can do it in 7 instructions :)
EXPP r0.y, r1.xxxx
MOV r0.x, r0.y
EXPP r0.y, r1.zzzz
MOV r0.z, r0.y
EXPP r0.y, r1.wwww
MOV r0.w, r0.y
EXPP r0.y, r1.yyyy
*/
/*
// Constants for sin and cos. 3 term approximation seems plenty
// (it's what i used for software sim, and had no visibly different
// results than the math library functions).
// When doing sin/cos together, some speedup might be obtained
// with good pairing of ops doing them simultaneously. Also save
// an instruction calculating r0^3.
D3DXVECTOR4 vSin( 1.0f, -1.0f/6.0f, 1.0f/120.0f, -1.0f/5040.0f );
D3DXVECTOR4 vCos( 1.0f, -1.0f/2.0f, 1.0f/ 24.0f, -1.0f/ 720.0f );
*/
/*
Cos():
r1 = mul(r0, r0); // r0^2
r2 = mul(r1, r1); // r0^4
//cos
r3 = mad( r1, vCos.yyyy, vCos.xxxx );
r3 = mad( r2, vCos.zzzz, r3 );
*/
/*
Sin();
r1 = mul(r0, r0); // r0^3
r1 = mul(r0, r1);
r2 = mul(r1, r1); // r0^6
r3 = mad( r1, vSin.yyyy, r0 );
r3 = mad( r2, vSin.zzzz, r3 );
*/
/*
SinCos():
r1 = mul(r0, r0); // r0^2
r2 = mul(r1, r0); // r0^3 // probably stall
r3 = mul(r1, r1); // r0^4
r4 = mul(r2, r2); // r0^6
r5 = mad( r1, vCos.yyyy, vCos.xxxx );
r6 = mad( r2, vSin.yyyy, r0 );
r5 = mad( r3, vCos.zzzz, r5 );
r6 = mad( r4, vSin.zzzz, r6 );
*/
/*
consts
kOneOverEightNsqPi = 1.f / ( 8.f * Pi * 4.f * 4.f );
kPiOverTwo = Pi / 2.f;
kTwoPi = Pi * 2.f;
kPi = Pi;
*/
/*
CONSTANT REGISTERS
VOLATILE CONSTS - change per invocation
C0-C3 local2proj matrix
C4 color
C5 freq vector
C6 phase vector
C7 amplitude vector
C8 center0
C9 center1
C10 center2
C11 center3
C12 scrunch = (scrunch, -scrunch, 0, 1);
CONSTANT CONSTS - forever more
C13 SinConsts = (1.0f, -1.0f/6.0f, 1.0f/120.0f, -1.0f/5040.0f);
C14 CosConsts = (1.0f, -1.0f/2.0f, 1.0f/ 24.0f, -1.0f/ 720.0f);
C15 PiConsts = (1.f / 8*Pi*N^2, Pi/2, Pi, 2*Pi);
C16 numberConsts = (0.f, 0.5f, 1.f, 2.f);
//=====================================
TEMP REGISTERS
r6 accumPos
r7 accumCos
r8 toCenter_Y
r9 toCenter_X
r11 filter
r10 tempFloat
*/
// const float4 kCosConsts = float4(1.0f, -1.0f/2.0f, 1.0f/ 24.0f, -1.0f/ 720.0f);
// const float4 kSinConsts = float4(1.0f, -1.0f/6.0f, 1.0f/120.0f, -1.0f/5040.0f);
// const float4 kPiConsts = float4(1.f / (8.f * 3.1415f * 16f), 3.1415f*0.5f, 3.1415f, 3.1515f*2.f);
// const float4 k0512 = float4(0.f, 0.5f, 1.f, 2.f);
// accumPos = inPos;
mov r6, v0;
//
// For each wave
// {
// // First, we want to filter out waves based on distance from the local origin
// dist = dp3(inPos, inPos);
dp3 r0, r6, r6;
// dist *= kFreqSq.xyzw;
mul r0, r0, c5;
mul r0, r0, c5;
// dist *= kOneOverEightNsqPi; // combine this into kFreqSq?
mul r0, r0, c15.xxxx;
// dist = min(dist, kPiOverTwo);
min r0, r0, c15.yyyy;
// filter = cos(dist);
mul r1, r0, r0; // r0^2
mul r2, r1, r1; // r1^2
mul r1, r1, c14.yyyy;
add r11, r1, c14.xxxx;
mad r11, r2, c14.zzzz, r11;
// filter *= kAmplitude.xyzw;
// mul r11, r11, c7;
// // Notice that if dist is a 4vec, all this can be simultaneously done for 4 waves at a time.
//
// Find the x/y distances and stuff them into r9(x) and r8(y) respectively
// toCenter_X.x = dir0.x * pos.x;
// toCenter_Y.x = dir0.y * pos.y;
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r6.z, r2, c16.zzzz;
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c5;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c7;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c16.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c8
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c9
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c16.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// // Scrunch in based on computed (normalized) normal
// temp = mul( accumNorm, kNegScrunchScale ); // kNegScrunchScale = (-scrunchScale, -scrunchScale, 0, 0);
// accumPos += temp;
dp3 r10.x, r11, c18.zxw; // winddir.x, winddir.y, 0, 0
// r10.x tells us whether our normal is opposed to the wind.
// If opposed, r10.x = 0, else r10.x = 1.f;
// We'll use this to kill the Scrunch on the back sides of waves.
// We use it for position right here, and then again for the
// normal just down a bit further.
slt r10.x, r10.x, c16.x;
mul r9, r10.xxxx, r11;
mad r6, r9, c12.yyzz, r6;
// mul r6.z, r6.z, r10.xxxx; DEBUG
// mad r6, r11, c12.yyzz, r6;
// accumNorm = mul (accumNorm, kScrunchScale ); // kScrunchScale = (scrunchScale, scrunchScale, 1, 1);
// accumCos *= (scrunchScale, scrunchScale, 0, 0);
mul r2.x, r6.z, c12.x;
mul r2.x, r2.x, r10.x; // ???
add r2.x, r2.x, c16.z;
// mul r7, r7, c12.xxzz;
mul r7.xy, r7.xy, r2.xx;
// This is actually wrong, but useful right now for visualizing the generated coords.
// See below for correct version.
sub r3, c16.xxzx, r7.xyzz;
// Normalize?
// We can either calculate an orthonormal basis from the
// computed normal, with Binormal = (0,1,0) X Normal, Tangent = Normal X (1,0,0),
// or compute our basis directly from the partial derivatives, with
// Binormal = (1, 0, -cosX), Tangent = (0, 1, -cosY), Normal = (cosX, cosY, 1)
//
// These work out to identically the same result, so we'll compute directly
// from the partials because it takes 2 fewer instructions.
//
// Note that our basis is NOT orthonormal. The Normal is equal to
// Binormal X Tangent, but Dot(Binormal, Tangent) != 0. The Binormal and Tangents
// are both correct tangents to the surface, and their projections on the XY plane
// are 90 degrees apart, but in 3-space, they are not orthogonal. Practical implications?
// Not really. I'm actually not really sure which is more "proper" for bump mapping.
//
// Note also that we add when we should subtract and subtract when we should
// add, so that r1, r2, r3 aren't Binormal, Tangent, Normal, but the rows
// of our transform, (Bx, Tx, Nx), (By, Ty, Ny), (Bz, Tz, Nz). See below for
// explanation.
//
// Binormal = Y % Normal
// Cross product3 is:
// mul res.xyz, a.yzx, b.zxy
// mad res.xyz, -a.zxy, b.yzx, res.xyz
// mul r1.xyz, c16.zxx, r3.zxy;
// mad r1.xyz, -c16.xxz, r3.yzx, r1.xyz;
// Tangent = Normal % X
// mul r2.xyz, r3.yzx, c16.xzx;
// mad r2.xyz, -r3.zxy, c16.xxz, r2;
add r1, c16.zxxx, r7.zzxz;
add r2, c16.xzxx, r7.zzyz;
// Note that we're swapping z and y to match our environment map tools in max.
// We do this through our normal map transform (oT1, oT2, oT3), making it
// a concatenation of:
//
// rotate about Z (blue) to turn our map into the wind
// windRot = | dirY -dirX 0 |
// | dirX dirY 0 |
// | 0 0 1 |
//
// swap our Y and Z axes to match our environment map
// swapYZ = | 1 0 0 |
// | 0 0 1 |
// | 0 1 0 |
//
// rotate the normal into the surface's tangent space basis
// basis = | Bx Tx Nx |
// | By Ty Ny |
// | Bz Tz Nz |
//
// Note that we've constucted the basis by taking advantage of the
// matrix being a pure rotation, as noted below, so r1, r2 and r3
// are actually constructed as:
// basis = | Bx -By -Bz |
// | -Tx Ty -Tz |
// | -Nx -Ny -Nz |
//
// Then the final normal map transform is:
//
// basis * swapYZ * windRot [ * normal ]
// sub r1.w, c17.x, r6.x;
// sub r2.w, c17.z, r6.z;
// sub r3.w, c17.y, r6.y;
// Big note here. All this math can blow up if the camera position
// is outside the environment sphere. It's assumed that's dealt
// with in the app setting up the constants. For that reason, the
// camera position used here might not be the real local camera position,
// which is needed for the angular attenuation, so we burn another constant
// with our pseudo-camera position. To restrain the pseudo-camera from
// leaving the sphere, we make:
// pseudoPos = envCenter + (realPos - envCenter) * dist * R / (dist + R)
// where dist = |realPos - envCenter|
// So, our "finitized" eyeray is:
// camPos + D * t - envCenter = D * t - (envCenter - camPos)
// with
// D = (pos - camPos) / |pos - camPos| // normalized usual eyeray
// and
// t = D dot F + sqrt( (D dot F)^2 - G )
// with
// F = (envCenter - camPos) => c19.xyz
// G = F^2 - R^2 => c19.w
// R = environment radius. => unused
//
// This all derives from the positive root of equation
// (camPos + (pos - camPos) * t - envCenter)^2 = R^2,
// In other words, where on a sphere of radius R centered about envCenter
// does the ray from the real camera position through this point hit.
//
// Note that F, G, and R are all constants (one point, two scalars).
//
// So first we calculate D into r0,
// then D dot F into r10.x,
// then (D dot F)^2 - G into r10.y
// then rsq( (D dot F)^2 - G ) into r9.x;
// then t = r10.z = r10.x + r10.y * r9.x;
// and
// r0 = D * t - (envCenter - camPos)
// = r0 * r10.zzzz - F;
//
sub r0, r6, c17;
dp3 r10.x, r0, r0;
rsq r10.x, r10.x;
mul r0, r0, r10.xxxx;
dp3 r10.x, r0, c19;
mad r10.y, r10.x, r10.x, -c19.w;
rsq r9.x, r10.y;
mad r10.z, r10.y, r9.x, r10.x;
mad r0.xyz, r0, r10.zzz, -c19.xyz;
mov r1.w, -r0.x;
mov r2.w, -r0.y;
mov r3.w, -r0.z;
// Now rotate our basis vectors into the wind
dp3 r0.x, r1, c18.xyww;
dp3 r0.y, r1, c18.zxww;
mov r1.xy, r0;
dp3 r0.x, r2, c18.xyww;
dp3 r0.y, r2, c18.zxww;
mov r2.xy, r0;
dp3 r0.x, r3, c18.xyww;
dp3 r0.y, r3, c18.zxww;
mov r3.xy, r0;
mov r0.w, c16.zzzz;
dp3 r0.x, r1, r1;
rsq r0.x, r0.x;
mul oT1, r1.xyzw, r0.xxxw;
// mul r8, r1.xyzw, r0.xxxw; // VISUAL
dp3 r0.x, r2, r2;
rsq r0.x, r0.x;
mul oT3, r2.xyzw, r0.xxxw;
// mul r9, r2.xyzw, r0.xxxw; // VISUAL
dp3 r0.x, r3, r3;
rsq r0.x, r0.x;
mul oT2, r3.xyzw, r0.xxxw;
// mul r9, r3.xyzw, r0.xxxw; // VISUAL
// mul r3, r3.xzyw, r0.xxxw;
// mul r3.xy, r3, -c16.zzzz;
/*
// Want:
// oT1 = (BIN.x, TAN.x, NORM.x, view2pos.x)
// oT2 = (BIN.y, TAN.y, NORM.y, view2pos.y)
// ot3 = (BIN.z, TAN.z, NORM.z, view2pos.z)
// with BIN, TAN, and NORM normalized.
// Unnormalized, we have
// BIN = (1, 0, -r7.x) where r7 == accumCos
// TAN = (0, 1, -r7.y)
// NORM= (r7.x, r7.y, 1)
// So, unnormalized, we have
// oT1 = (1, 0, r7.x, view2pos.x)
// oT2 = (0, 1, r7.y, view2pos.y)
// oT3 = (-r7.x, -r7.y, 1, view2pos.z)
// which is just reversing the signs on the accumCos
// terms above. So the normalized version is just
// reversing the signs on the normalized version above.
*/
//mov oT3, r4;
//
// // Transform position to screen
//
//
m4x4 oPos, r6, c0;
// Still need to attenuate based on position
mov oD0, c4;
// This should be in local space after xforming v0
dp4 r0.x, v0, c10;
dp4 r0.y, v0, c11;
mov r0.zw, c16.xxxz;
mov oT0, r0
// mov oT0, v7;
// Questionble attenuation follows
// Find vector from this point to camera and normalize
sub r0, c17, r6;
dp3 r1.x, r0, r0;
rsq r1.x, r1.x;
mul r0, r0, r1.xxxx;
// Dot that with the computed normal
dp3 r1.x, r0, r11;
// dp3 r1.x, r0, r3; // if you want the adjusted normal, you'll need to normalize/swizzle r3
// Map dot=1 => 0, dot=0 => 1
sub r1.xyzw, c16.zzzz, r1.xxxx;
add r1.w, r1.wwww, c16.zzzz;
mul r1.w, r1.wwww, c16.yyyy;
// No need to clamp, since the destination register (in the pixel shader)
// will saturate [0..1] anyway.
mul oD1, r1, c20;
// mov oD1, r9;
// mov oD1, r8.xzyw;

View File

@ -0,0 +1,243 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c25; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c30 = waterlevel + offset
// c31 = (maxAtten - minAtten) / depthFalloff
// c32 = minAtten.
// And in particular:
// c30.w = waterlevel
// c31.w = 1.f;
// c32.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c30, r6.zzzz;
mul r4, r4, c31;
add r4, r4, c32;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
//mov r4.xyz, c16.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c29;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c16.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c30.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= kFreq.xyzw;
mul r1, r1, c5;
// cosDist *= kAmplitude.xyzw; // Combine?
mul r1, r1, c7;
// cosDist *= filter;
mul r1, r1, r11;
//
// accumCos = (0, 0, 0, 0);
mov r7, c16.xxxx;
// temp = dp4( cosDist, toCenter_X );
// accumCos.x += temp.xxxx; (but accumCos = (0,0,0,0)
dp4 r7.x, r1, -c8
//
// temp = dp4( cosDist, toCenter_Y );
// accumCos.y += temp.xxxx;
dp4 r7.y, r1, -c9
//
// }
//
// accumBin = (1, 0, -accumCos.x);
// accumTan = (0, 1, -accumCos.y);
// accumNorm = (accumCos.x, accumCos.y, 1);
mov r11, c16.xxzx;
add r11, r11, r7;
dp3 r10.x, r11, r11;
rsq r10.x, r10.x;
mul r11, r11, r10.xxxx;
//
// Add in our scrunch (offset in X/Y plane).
// Scale down our scrunch amount by the wave scaling
mul r10.x, c12.y, r4.z;
mad r6.xy, r11.xy, r10.xx, r6.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c35.z, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c35.z;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c25; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c4.x;
mul oFog, r10.x, c4.y;
mov oPos, r9;
// Dyna Stuff
// Constants
// c33 = fC1U, fC2U, fC1V, fC2V
// c34 = fInitAtten, t, life, 1.f / (life-decay)
// c35 = ramp, 1.f / ramp, BIAS (positive is up), FREE
//
// Vertex Info
// v7.z = fBirth (because we don't use it for anything else).
//
// Initialize r1.zw to 0,1
mov r1, c16.xxxz;
// Calc r1.x = age, r1.y = atten
// age = t - birth.
sub r1.x, c34.y, v7.z;
// atten = clamp0_1(age / ramp) * clamp0_1((life-age) / (life-decay));
// first clamp0_1(age/ramp)
mul r1.y, r1.x, c35.y;
min r1.y, r1.y, c16.z; // Clamp to one (can't go negative).
// now clamp0_1((life-age) / (life-decay));
sub r1.z, c34.z, r1.x;
mul r1.z, r1.z, c34.w;
min r1.z, r1.z, c16.z; // Clamp to one
max r1.z, r1.z, c16.x; // Clamp to zero
mul r1.y, r1.y, r1.z; // atten is the product of the two terms.
// color is (atten, atten, atten, 1.f)
// Need to calculate opacity we would have had from vs_WaveFixedFin6.inl
// Right now that's just modulating by r4.y.
mul r0.y, r4.y, c34.x;
mul oD0, r0.yyyy, r1.yyyw;
//mov oD0, c16.zzzz; // HACKTEST
// UVW = (inUVW - 0.5) * scale + 0.5
// where:
// scale = (fC1U / (age * fC2U + 1.f)), fC1V / (age * fC2U + 1.f), 1.f, 1.f
mov r2, c16.xxxz;
mul r2.xy, r1.xx, c33.yw;
add r2.xy, r2.xy, c16.zz;
rcp r2.x, r2.x;
rcp r2.y, r2.y;
mul r2.xy, r2.xy, c33.xz;
sub r1.xy, v7.xy, c16.yy;
mul r1.xy, r1.xy, r2.xy;
add r1.xy, r1.xy, c16.yy;
mov oT0, r1;

View File

@ -0,0 +1,226 @@
vs.1.1
dcl_position v0
dcl_color v5
dcl_texcoord0 v7
// Store our input position in world space in r6
m4x3 r6, v0, c25; // v0 * l2w
// Fill out our w (m4x3 doesn't touch w).
mov r6.w, c16.z;
//
// Input diffuse v5 color is:
// v5.r = overall transparency
// v5.g = reflection strength (transparency)
// v5.b = overall wave scaling
//
// v5.a is:
// v5.w = 1/(2.f * edge length)
// So per wave filtering is:
// min(max( (waveLen * v5.wwww) - 1), 0), 1.f);
// So a wave effect starts dying out when the wave is 4 times the sampling frequency,
// and is completely filtered at 2 times sampling frequency.
// We'd like to make this autocalculated based on the depth of the water.
// The frequency filtering (v5.w) still needs to be calculated offline, because
// it's dependent on edge length, but the first 3 filterings can be calculated
// based on this vertex.
// Basically, we want the transparency, reflection strength, and wave scaling
// to go to zero as the water depth goes to zero. Linear falloffs are as good
// a place to start as any.
//
// depth = waterlevel - r6.z => depth in feet (may be negative)
// depthNorm = depth / depthFalloff => zero at watertable, one at depthFalloff beneath
// atten = minAtten + depthNorm * (maxAtten - minAtten);
// These are all vector ops.
// This provides separate ramp ups for each of the channels (they reach full unfiltered
// values at different depths), but doesn't provide separate controls for where they
// go to zero (they all go to zero at zero depth). For that we need an offset. An offset
// in feet (depth) is probably the most intuitive. So that changes the first calculation
// of depth to:
// depth = waterlevel - r6.z + offset
// = (waterlevel + offset) - r6.z
// And since we only need offsets for 3 channels, we can make the waterlevel constant
// waterlevel[chan] = watertableheight + offset[chan],
// with waterlevel.w = watertableheight.
//
// So:
// c30 = waterlevel + offset
// c31 = (maxAtten - minAtten) / depthFalloff
// c32 = minAtten.
// And in particular:
// c30.w = waterlevel
// c31.w = 1.f;
// c32.w = 0;
// So r4.w is the depth of this vertex in feet.
// Dot our position with our direction vectors.
mul r0, c8, r6.xxxx;
mad r0, c9, r6.yyyy, r0;
//
// dist = mad( dist, kFreq.xyzw, kPhase.xyzw);
mul r0, r0, c5;
add r0, r0, c6;
//
// // Now we need dist mod'd into range [-Pi..Pi]
// dist *= rcp(kTwoPi);
rcp r4, c15.wwww;
add r0, r0, c15.zzzz;
mul r0, r0, r4;
// dist = frac(dist);
expp r1.y, r0.xxxx
mov r1.x, r1.yyyy
expp r1.y, r0.zzzz
mov r1.z, r1.yyyy
expp r1.y, r0.wwww
mov r1.w, r1.yyyy
expp r1.y, r0.yyyy
// dist *= kTwoPi;
mul r0, r1, c15.wwww;
// dist += -kPi;
sub r0, r0, c15.zzzz;
//
// sincos(dist, sinDist, cosDist);
// sin = r0 + r0^3 * vSin.y + r0^5 * vSin.z
// cos = 1 + r0^2 * vCos.y + r0^4 * vCos.z
mul r1, r0, r0; // r0^2
mul r2, r1, r0; // r0^3 - probably stall
mul r3, r1, r1; // r0^4
mul r4, r1, r2; // r0^5
mul r5, r2, r3; // r0^7
mul r1, r1, c14.yyyy; // r1 = r0^2 * vCos.y
mad r2, r2, c13.yyyy, r0; // r2 = r0 + r0^3 * vSin.y
add r1, r1, c14.xxxx; // r1 = 1 + r0^2 * vCos.y
mad r2, r4, c13.zzzz, r2; // r2 = r0 + r0^3 * vSin.y + r0^5 * vSin.z
mad r1, r3, c14.zzzz, r1; // r1 = 1 + r0^2 * vCos.y + r0^4 * vCos.z
// r0^7 & r0^6 terms
mul r4, r4, r0; // r0^6
mad r2, r5, c13.wwww, r2;
mad r1, r4, c14.wwww, r1;
// Calc our depth based filtering here into r4 (because we don't use it again
// after here, and we need our filtering shortly).
sub r4, c30, r6.zzzz;
mul r4, r4, c31;
add r4, r4, c32;
// Clamp .xyz to range [0..1]
min r4.xyz, r4, c16.zzzz;
max r4.xyz, r4, c16.xxxx;
//mov r4.xyz, c16.xxx; // HACKTEST
// Calc our filter (see above).
mul r11, v5.wwww, c29;
max r11, r11, c16.xxxx;
min r11, r11, c16.zzzz;
//mov r2, r1;
// r2 == sinDist
// r1 == cosDist
// sinDist *= filter;
mul r2, r2, r11;
// sinDist *= kAmplitude.xyzw
mul r2, r2, c7;
// height = dp4(sinDist, kOne);
// accumPos.z += height; (but accumPos.z is currently 0).
dp4 r8.x, r2, c16.zzzz;
mul r8.y, r8.x, r4.z;
add r8.z, r8.y, c30.w;
max r6.z, r6.z, r8.z;
// r8.x == wave height relative to 0
// r8.y == dampened wave relative to 0
// r8.z == dampened wave height in world space
// r6.z == wave height clamped to never go beneath ground level
//
// cosDist *= filter;
mul r1, r1, r11;
// Pos = (in.x + S, in.y + R, r6.z)
// S = sum(k Dir.x A cos())
// R = sum(k Dir.y A cos())
// c10 = k Dir.x A
// c11 = k Dir.y A
// S = sum(cosDist * c10);
dp4 r7.x, r1, c10;
// R = sum(cosDist * c11);
dp4 r7.y, r1, c11;
add r6.xy, r6.xy, r7.xy;
// Bias our vert up a bit to compensate for precision errors.
// In particular, our filter coefficients are coming in as
// interpolated bytes, so there's bound to be a lot of slop
// from that. We've got a free slot in c35.z, so we'll use that.
// A better implementation would be to bias and scale our screen
// vert, effectively pushing the vert toward the camera without
// actually moving it, but this is easier and might work just
// as well.
add r6.z, r6.z, c35.z;
//
// // Transform position to screen
//
//
//m4x3 r6, v0, c25; // HACKAGE
//mov r6.w, c16.z; // HACKAGE
//m4x4 oPos, r6, c0; // ADDFOG
m4x4 r9, r6, c0;
add r10.x, r9.w, c4.x;
mul oFog, r10.x, c4.y;
mov oPos, r9;
// Dyna Stuff
// Constants
// c33 = fC1U, fC2U, fC1V, fC2V
// c34 = fInitAtten, t, life, 1.f / (life-decay)
// c35 = ramp, 1.f / ramp, BIAS (positive is up), FREE
//
// Vertex Info
// v7.z = fBirth (because we don't use it for anything else).
//
// Initialize r1.zw to 0,1
mov r1, c16.xxxz;
// Calc r1.x = age, r1.y = atten
// age = t - birth.
sub r1.x, c34.y, v7.z;
// atten = clamp0_1(age / ramp) * clamp0_1((life-age) / (life-decay));
// first clamp0_1(age/ramp)
mul r1.y, r1.x, c35.y;
min r1.y, r1.y, c16.z; // Clamp to one (can't go negative).
// now clamp0_1((life-age) / (life-decay));
sub r1.z, c34.z, r1.x;
mul r1.z, r1.z, c34.w;
min r1.z, r1.z, c16.z; // Clamp to one
max r1.z, r1.z, c16.x; // Clamp to zero
mul r1.y, r1.y, r1.z; // atten is the product of the two terms.
// color is (atten, atten, atten, 1.f)
// Need to calculate opacity we would have had from vs_WaveFixedFin7.inl
// Right now that's just modulating by r4.y.
mul r0.y, r4.y, c34.x;
mul oD0, r0.yyyy, r1.yyyw;
//mov oD0, c16.zzzz; // HACKTEST
// UVW = (inUVW - 0.5) * scale + 0.5
// where:
// scale = (fC1U / (age * fC2U + 1.f)), fC1V / (age * fC2U + 1.f), 1.f, 1.f
mov r2, c16.xxxz;
mul r2.xy, r1.xx, c33.yw;
add r2.xy, r2.xy, c16.zz;
rcp r2.x, r2.x;
rcp r2.y, r2.y;
mul r2.xy, r2.xy, c33.xz;
sub r1.xy, v7.xy, c16.yy;
mul r1.xy, r1.xy, r2.xy;
add r1.xy, r1.xy, c16.yy;
mov oT0, r1;

View File

@ -0,0 +1,338 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsGMaterial.h"
#include <math.h>
#include "hsTypes.h"
#include "hsMemory.h"
//#include "../plGeometry/hsTriangle3.h"
#include "hsResMgr.h"
#include "plLayerInterface.h"
#include "plLayer.h"
#include "../plMessage/plMatRefMsg.h"
#include "plProfile.h"
plProfile_CreateTimer("MaterialAnims", "Animation", MaterialAnims);
plLayer defaultLayer;
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////
hsGMaterial::hsGMaterial() :
fLOD(0),
fCompFlags(0),
fLoadFlags(0),
fLastUpdateTime(0)
{
}
hsGMaterial::~hsGMaterial()
{
IClearLayers();
}
plLayerInterface* hsGMaterial::GetPiggyBack(UInt32 which)
{
return fPiggyBacks[which];
}
plLayerInterface* hsGMaterial::GetLayer(UInt32 which)
{
return fLayers[which];
}
UInt32 hsGMaterial::IMakeExtraLayer()
{
fLayers.ExpandAndZero(GetNumLayers()+1);
return fLayers.GetCount();
}
void hsGMaterial::IClearLayers()
{
fLayers.Reset();
}
void hsGMaterial::SetNumLayers(int cnt)
{
if( cnt < fLayers.GetCount() )
fLayers.SetCount(cnt);
else
fLayers.ExpandAndZero(cnt);
}
hsGMaterial* hsGMaterial::Clone()
{
hsGMaterial* clo = CloneNoLayers();
clo->SetNumLayers(GetNumLayers());
int i;
for( i = 0; i < GetNumLayers(); i++ )
clo->SetLayer(fLayers[i], i);
return clo;
}
hsGMaterial* hsGMaterial::CloneNoLayers()
{
hsGMaterial* clo = TRACKED_NEW hsGMaterial;
clo->fCompFlags = fCompFlags;
clo->fLoadFlags = fLoadFlags;
return clo;
}
plLayer* hsGMaterial::MakeBaseLayer()
{
plLayer* newLay = TRACKED_NEW plLayer;
newLay->InitToDefault();
IClearLayers();
hsAssert(GetKey(), "All materials need a key (or temp key)");
char buff[256];
if( GetKey()->GetName() )
sprintf(buff, "%s_%s", GetKey()->GetName(), "Layer");
else
strcpy(buff, "Layer");
hsgResMgr::ResMgr()->NewKey( buff, newLay, GetKey() != nil ? GetKey()->GetUoid().GetLocation() : plLocation::kGlobalFixedLoc );
// Add layer so we have it now.
AddLayerViaNotify(newLay);
return newLay;
}
UInt32 hsGMaterial::AddLayerViaNotify(plLayerInterface* layer)
{
int idx = GetNumLayers();
// Add via notify so we'll dispose of it properly later.
plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnRequest, idx, plMatRefMsg::kLayer);
hsgResMgr::ResMgr()->SendRef(layer->GetKey(), msg, plRefFlags::kActiveRef);
fLayers.SetCount(idx+1);
fLayers[idx] = layer;
return idx;
}
void hsGMaterial::ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack)
{
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
int i;
for( i = 0; i < layers.GetCount(); i++ )
{
if( layers[i] == oldLay )
break;
}
hsAssert(i < layers.GetCount(), "Replacing a layer we don't have");
if( i >= layers.GetCount() )
return;
SetLayer(newLay, i, piggyBack);
}
void hsGMaterial::RemoveLayer(plLayerInterface* lay, hsBool piggyBack)
{
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
int i;
for( i = 0; i < layers.GetCount(); i++ )
{
if( layers[i] == lay )
break;
}
if (i >= layers.GetCount())
return;
layers.Remove(i);
}
void hsGMaterial::InsertLayer(plLayerInterface* layer, Int32 which, hsBool piggyBack)
{
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
hsAssert(which <= layers.GetCount(), "Material layers Exceeding test depth");
layers.InsertAtIndex(which, layer);
}
void hsGMaterial::SetLayer(plLayerInterface* layer, Int32 which, hsBool insert, hsBool piggyBack)
{
if( insert )
{
InsertLayer(layer, which, piggyBack);
}
else
{
hsTArray<plLayerInterface*>& layers = piggyBack ? fPiggyBacks : fLayers;
if( which < 0 )
which = layers.GetCount();
hsAssert(which <= layers.GetCount(), "Material layers Exceeding test depth");
if( which < layers.GetCount() )
layers[which] = layer;
else
layers.Append(layer);
}
}
void hsGMaterial::Write(hsStream* s)
{
s->WriteSwap32(fLoadFlags);
s->WriteSwap32(fCompFlags);
s->WriteSwap32(GetNumLayers());
s->WriteSwap32(GetNumPiggyBacks());
}
void hsGMaterial::Read(hsStream* s)
{
fLoadFlags = s->ReadSwap32();
fCompFlags = s->ReadSwap32();
IClearLayers();
int n = s->ReadSwap32();
fLayers.SetCountAndZero(n);
n = s->ReadSwap32();
fPiggyBacks.SetCountAndZero(n);
}
void hsGMaterial::Write(hsStream *stream, hsResMgr *group)
{
plSynchedObject::Write(stream, group);
Write(stream);
// Write one (or many) texture indices
int iLay;
for( iLay = 0; iLay < GetNumLayers(); iLay++ )
{
group->WriteKey(stream,GetLayer(iLay));
}
for( iLay = 0; iLay < GetNumPiggyBacks(); iLay++ )
{
group->WriteKey(stream, GetPiggyBack(iLay));
}
}
void hsGMaterial::Read(hsStream *stream, hsResMgr *group)
{
plSynchedObject::Read(stream, group);
Read(stream);
int iLay;
// Assign texture(s)
for (iLay = 0; iLay < GetNumLayers(); iLay++)
{
plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kLayer);
plKey key = group->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
}
for (iLay = 0; iLay < GetNumPiggyBacks(); iLay++)
{
plMatRefMsg* msg = TRACKED_NEW plMatRefMsg(GetKey(), plRefMsg::kOnCreate, iLay, plMatRefMsg::kPiggyBack);
plKey key = group->ReadKeyNotifyMe(stream, msg, plRefFlags::kActiveRef);
}
}
void hsGMaterial::Eval(double secs, UInt32 frame)
{
plProfile_BeginLap(MaterialAnims, GetKeyName());
int i;
for( i = 0; i < GetNumLayers(); i++ )
{
if( fLayers[i] )
fLayers[i]->Eval(secs, frame, 0);
}
for( i = 0; i < GetNumPiggyBacks(); i++ )
{
if( fPiggyBacks[i] )
fPiggyBacks[i]->Eval(secs, frame, 0);
}
plProfile_EndLap(MaterialAnims, GetKeyName());
}
void hsGMaterial::Reset()
{
int i;
for( i = 0; i < GetNumLayers(); i++ )
{
if( fLayers[i] )
fLayers[i]->Eval(0, 0, 0);
}
}
void hsGMaterial::Init()
{
Reset();
}
hsBool hsGMaterial::MsgReceive(plMessage* msg)
{
plMatRefMsg* refMsg = plMatRefMsg::ConvertNoRef(msg);
if( refMsg )
{
int which = refMsg->fWhich;
hsBool piggyBack = 0 != (refMsg->fType & plMatRefMsg::kPiggyBack);
plLayerInterface* lay= plLayerInterface::ConvertNoRef(refMsg->GetRef());
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest) )
{
hsBool insert = 0 != (refMsg->fType & plMatRefMsg::kInsert);
SetLayer(lay, which,
insert,
piggyBack );
}
else if( refMsg->GetContext() & plRefMsg::kOnReplace )
ReplaceLayer(plLayerInterface::ConvertNoRef(refMsg->GetOldRef()), lay, piggyBack);
else if( refMsg->GetContext() & (plRefMsg::kOnRemove | plRefMsg::kOnDestroy) )
RemoveLayer(lay, piggyBack);
else
ReplaceLayer(lay, &defaultLayer, piggyBack);
return true;
}
return plSynchedObject::MsgReceive(msg);
}

View File

@ -0,0 +1,146 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef hsGCompMatDefined
#define hsGCompMatDefined
#include "hsTemplates.h"
#include "../pnNetCommon/plSynchedObject.h"
#include "hsGMatState.h"
#include "hsColorRGBA.h"
class hsScene;
class hsResMgr;
class hsG3DDevice;
class plLayerInterface;
class plLayer;
// inlines for Texture and Material after class declarations
class hsGMaterial : public plSynchedObject
{
public:
// Things we have to know that some layer has
enum hsGCompFlags {
kCompShaded = 0x1,
kCompEnvironMap = 0x2,
kCompProjectOnto = 0x4,
kCompSoftShadow = 0x8,
kCompSpecular = 0x10,
kCompTwoSided = 0x20,
kCompDrawAsSplats = 0x40,
kCompAdjusted = 0x80,
kCompNoSoftShadow = 0x100,
kCompDynamic = 0x200,
kCompDecal = 0x400,
kCompIsEmissive_OBSOLETE = 0x800,
kCompIsLightMapped = 0x1000,
kCompNeedsBlendChannel = 0x2000 // For materials that have extra layers to simulate vtx alpha
};
enum UpdateFlags
{
kUpdateAgain = 0x01
};
protected:
UInt32 fLOD;
hsTArray<plLayerInterface*> fLayers;
hsTArray<plLayerInterface*> fPiggyBacks;
UInt32 fCompFlags;
UInt32 fLoadFlags;
hsScalar fLastUpdateTime;
void IClearLayers();
UInt32 IMakeExtraLayer();
void InsertLayer(plLayerInterface* lay, Int32 which = 0, hsBool piggyBack = false);
void SetLayer(plLayerInterface* lay, Int32 which = 0, hsBool insert=false, hsBool piggyBack=false);
void ReplaceLayer(plLayerInterface* oldLay, plLayerInterface* newLay, hsBool piggyBack = false);
void RemoveLayer(plLayerInterface* oldLay, hsBool piggyBack = false);
public:
hsGMaterial();
~hsGMaterial();
virtual hsGMaterial* Clone();
virtual hsGMaterial* CloneNoLayers(); // For things like blending copies, that manipulate layers directly.
// copies no keyed objects.
plLayer* MakeBaseLayer();
plLayerInterface* GetLayer(UInt32 which);
plLayerInterface* GetPiggyBack(UInt32 which);
UInt32 AddLayerViaNotify(plLayerInterface* lay);
UInt32 GetNumLayers() const { return fLayers.GetCount(); }
void SetNumLayers(int cnt);
UInt32 GetNumPiggyBacks() const { return fPiggyBacks.GetCount(); }
void SetNumPiggyBacks();
void SetLOD(UInt32 l) { fLOD = l; }
UInt32 GetLOD() const { return fLOD; }
void SetCompositeFlags(UInt32 f) { fCompFlags = f; } // normally composite flags are calculated internally, not set.
UInt32 GetCompositeFlags() const { return fCompFlags; }
UInt32 GetLoadFlags() const { return fLoadFlags; }
hsScalar GetLastUpdateTime() const { return fLastUpdateTime; }
void SetLastUpdateTime(hsScalar f) { fLastUpdateTime = f; }
hsBool IShouldUpdate(hsScalar secs, UInt32 flags) { return GetLastUpdateTime() != secs || (flags & kUpdateAgain); }
hsBool IsDynamic() const { return (fCompFlags & kCompDynamic); }
hsBool IsDecal() const { return (fCompFlags & kCompDecal); }
hsBool NeedsBlendChannel() { return (fCompFlags & kCompNeedsBlendChannel); }
virtual void Read(hsStream* s);
virtual void Write(hsStream* s);
virtual void Read(hsStream* s, hsResMgr *group);
virtual void Write(hsStream* s, hsResMgr *group);
virtual void Eval(double secs, UInt32 frame);
virtual void Reset();
virtual void Init();
CLASSNAME_REGISTER( hsGMaterial );
GETINTERFACE_ANY( hsGMaterial, hsKeyedObject );
virtual hsBool MsgReceive(plMessage* msg);
};
#endif // hsGCompMatDefined

View File

@ -0,0 +1,275 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "plGrassShaderMod.h"
#include "hsTimer.h"
#include "hsResMgr.h"
#include "plgDispatch.h"
#include "../pnKeyedObject/plUoid.h"
//#include "../pnSceneObject/plDrawInterface.h"
#include "../pnMessage/plObjRefMsg.h"
#include "../pnMessage/plTimeMsg.h"
#include "../plMessage/plMatRefMsg.h"
#include "../plMessage/plAgeLoadedMsg.h"
#include "../plMessage/plLayRefMsg.h"
#include "../plDrawable/plAccessGeometry.h"
#include "../plDrawable/plAccessSpan.h"
#include "../plDrawable/plAccessVtxSpan.h"
#include "../plSurface/hsGMaterial.h"
#include "../plSurface/plShader.h"
#include "../plSurface/plLayer.h"
void plGrassWave::Write(hsStream *s)
{
s->WriteSwapScalar(fDistX);
s->WriteSwapScalar(fDistY);
s->WriteSwapScalar(fDistZ);
s->WriteSwapScalar(fDirX);
s->WriteSwapScalar(fDirY);
s->WriteSwapScalar(fSpeed);
}
void plGrassWave::Read(hsStream *s)
{
fDistX = s->ReadSwapScalar();
fDistY = s->ReadSwapScalar();
fDistZ = s->ReadSwapScalar();
fDirX = s->ReadSwapScalar();
fDirY = s->ReadSwapScalar();
fSpeed = s->ReadSwapScalar();
}
/////////////////////////////////////////////////////////////////////////////////////////////
plGrassShaderMod::~plGrassShaderMod()
{
plgDispatch::Dispatch()->UnRegisterForExactType(plEvalMsg::Index(), GetKey());
plgDispatch::Dispatch()->UnRegisterForExactType(plInitialAgeStateLoadedMsg::Index(), GetKey());
plgDispatch::Dispatch()->UnRegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
}
void plGrassShaderMod::ResetWaves()
{
int i;
for (i = 0; i < kNumWaves; i++)
{
fWaves[i].fDistX = 0.F;
fWaves[i].fDistY = 0.F;
fWaves[i].fDistZ = 0.F;
fWaves[i].fDirX = 0.F;
fWaves[i].fDirY = 0.F;
fWaves[i].fSpeed = 0.F;
}
RefreshWaves();
}
void plGrassShaderMod::RefreshWaves()
{
IRefreshWaves(fVShader);
}
void plGrassShaderMod::IRefreshWaves(plShader *vShader)
{
// Dynamic params, set by artist
vShader->SetVector(plGrassVS::kWaveDistX, fWaves[0].fDistX, fWaves[1].fDistX, fWaves[2].fDistX, fWaves[3].fDistX);
vShader->SetVector(plGrassVS::kWaveDistY, fWaves[0].fDistY, fWaves[1].fDistY, fWaves[2].fDistY, fWaves[3].fDistY);
vShader->SetVector(plGrassVS::kWaveDistZ, fWaves[0].fDistZ, fWaves[1].fDistZ, fWaves[2].fDistZ, fWaves[3].fDistZ);
vShader->SetVector(plGrassVS::kWaveDirX, fWaves[0].fDirX, fWaves[1].fDirX, fWaves[2].fDirX, fWaves[3].fDirX);
vShader->SetVector(plGrassVS::kWaveDirY, fWaves[0].fDirY, fWaves[1].fDirY, fWaves[2].fDirY, fWaves[3].fDirY);
vShader->SetVector(plGrassVS::kWaveSpeed, fWaves[0].fSpeed, fWaves[1].fSpeed, fWaves[2].fSpeed, fWaves[3].fSpeed);
}
void plGrassShaderMod::AddTarget(plSceneObject *object)
{
fTarget = object;
}
void plGrassShaderMod::RemoveTarget(plSceneObject *object)
{
fTarget = nil;
}
hsBool plGrassShaderMod::MsgReceive(plMessage *msg)
{
plGenRefMsg* refMsg = plGenRefMsg::ConvertNoRef(msg);
if (refMsg)
{
if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
{
switch (refMsg->fType)
{
case kRefGrassVS:
fVShader = plShader::ConvertNoRef(refMsg->GetRef());
break;
case kRefGrassPS:
fPShader = plShader::ConvertNoRef(refMsg->GetRef());
break;
case kRefMaterial:
fMaterial = hsGMaterial::ConvertNoRef(refMsg->GetRef());
break;
default:
break;
}
}
else
{
switch (refMsg->fType)
{
case kRefGrassVS:
fVShader = nil;
break;
case kRefGrassPS:
fPShader = nil;
break;
case kRefMaterial:
fMaterial = nil;
break;
default:
break;
}
}
return true;
}
plAgeLoadedMsg* ageLoaded = plAgeLoadedMsg::ConvertNoRef(msg);
if( (ageLoaded && ageLoaded->fLoaded) || plInitialAgeStateLoadedMsg::ConvertNoRef(msg) )
{
ISetupShaders();
return true;
}
return plModifier::MsgReceive(msg);
}
void plGrassShaderMod::Write(hsStream *stream, hsResMgr *mgr)
{
plModifier::Write(stream, mgr);
mgr->WriteKey(stream, fMaterial ? fMaterial->GetKey() : nil);
int i;
for (i = 0; i < kNumWaves; i++)
fWaves[i].Write(stream);
}
void plGrassShaderMod::Read(hsStream *stream, hsResMgr *mgr)
{
plModifier::Read(stream, mgr);
mgr->ReadKeyNotifyMe(stream, TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefMaterial), plRefFlags::kActiveRef);
int i;
for (i = 0; i < kNumWaves; i++)
fWaves[i].Read(stream);
plgDispatch::Dispatch()->RegisterForExactType(plEvalMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plInitialAgeStateLoadedMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plAgeLoadedMsg::Index(), GetKey());
}
hsBool plGrassShaderMod::IEval(double secs, hsScalar del, UInt32 dirty)
{
if (fVShader)
{
fVShader->SetVector(plGrassVS::kAppConsts, float(hsTimer::GetSysSeconds()), 0.f, 0.f, 0.f);
}
return TRUE;
}
void plGrassShaderMod::ISetupShaders()
{
if (!fVShader)
{
plShader* vShader = TRACKED_NEW plShader;
char buff[256];
sprintf(buff, "%s_GrassVS", GetKey()->GetName());
hsgResMgr::ResMgr()->NewKey(buff, vShader, GetKey()->GetUoid().GetLocation());
vShader->SetIsPixelShader(false);
vShader->SetInputFormat(1);
vShader->SetOutputFormat(0);
vShader->SetNumConsts(plGrassVS::kNumConsts);
vShader->SetVector(plGrassVS::kNumericConsts, 0.f, 0.5f, 1.f, 2.f);
vShader->SetVector(plGrassVS::kPiConsts, 1.f / (8.f*hsScalarPI*4.f*4.f), hsScalarPI/2.f, hsScalarPI, hsScalarPI*2.f);
vShader->SetVector(plGrassVS::kSinConsts, -1.f/6.f, 1.f/120.f, -1.f/5040.f, 1.f/362880.f);
IRefreshWaves(vShader);
vShader->SetNumPipeConsts(1);
vShader->SetPipeConst(0, plPipeConst::kLocalToNDC, plGrassVS::kLocalToNDC);
vShader->SetDecl(plShaderTable::Decl(plShaderID::vs_GrassShader));
hsgResMgr::ResMgr()->SendRef(vShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassVS), plRefFlags::kActiveRef);
}
if (!fPShader)
{
plShader* pShader = TRACKED_NEW plShader;
char buff[256];
sprintf(buff, "%s_GrassPS", GetKey()->GetName());
hsgResMgr::ResMgr()->NewKey(buff, pShader, GetKey()->GetUoid().GetLocation());
pShader->SetIsPixelShader(true);
pShader->SetNumConsts(0);
pShader->SetInputFormat(0);
pShader->SetOutputFormat(0);
pShader->SetDecl(plShaderTable::Decl(plShaderID::ps_GrassShader));
hsgResMgr::ResMgr()->SendRef(pShader->GetKey(), TRACKED_NEW plGenRefMsg(GetKey(), plRefMsg::kOnRequest, 0, kRefGrassPS), plRefFlags::kActiveRef);
}
plLayer* layer = plLayer::ConvertNoRef(fMaterial->GetLayer(0)->BottomOfStack());
if (layer && (layer->GetVertexShader() != fVShader))
{
plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader);
hsgResMgr::ResMgr()->SendRef(fVShader->GetKey(), refMsg, plRefFlags::kActiveRef);
}
if (layer && (layer->GetPixelShader() != fPShader))
{
plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(layer->GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader);
hsgResMgr::ResMgr()->SendRef(fPShader->GetKey(), refMsg, plRefFlags::kActiveRef);
}
}

View File

@ -0,0 +1,132 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef PLGRASSSHADERMOD_INC
#define PLGRASSSHADERMOD_INC
#include "../pnModifier/plModifier.h"
class plSceneObject;
class hsGMaterial;
class plShader;
class plGrassWave
{
public:
plGrassWave() : fDistX(0.F), fDistY(0.F), fDistZ(0.F), fDirX(0.F), fDirY(0.F), fSpeed(0.F) {}
hsScalar fDistX;
hsScalar fDistY;
hsScalar fDistZ;
hsScalar fDirX;
hsScalar fDirY;
hsScalar fSpeed;
void Write(hsStream *s);
void Read(hsStream *s);
};
class plGrassShaderMod : public plModifier
{
public:
plGrassShaderMod() : fTarget(nil), fMaterial(nil), fVShader(nil), fPShader(nil) {}
~plGrassShaderMod();
void ResetWaves();
void RefreshWaves();
virtual int GetNumTargets() const { return fTarget ? 1 : 0; }
virtual plSceneObject* GetTarget(int w) const { return fTarget; }
virtual void AddTarget(plSceneObject *object);
virtual void RemoveTarget(plSceneObject *object);
virtual hsBool MsgReceive(plMessage *msg);
virtual void Write(hsStream *stream, hsResMgr *mgr);
virtual void Read(hsStream *stream, hsResMgr *mgr);
CLASSNAME_REGISTER( plGrassShaderMod );
GETINTERFACE_ANY( plGrassShaderMod, plModifier );
enum {
kRefGrassVS,
kRefGrassPS,
kRefMaterial,
};
enum {
kNumWaves = 4,
};
plGrassWave fWaves[kNumWaves];
protected:
virtual hsBool IEval(double secs, hsScalar del, UInt32 dirty);
virtual void IApplyDynamic() {}; // dummy function required by base class
void ISetupShaders();
void IRefreshWaves(plShader *vShader);
plSceneObject *fTarget;
hsGMaterial *fMaterial;
plShader *fVShader;
plShader *fPShader;
};
namespace plGrassVS
{
enum {
kLocalToNDC = 0,
kNumericConsts = 4,
kAppConsts = 5,
kPiConsts = 6,
kSinConsts = 7,
kWaveDistX = 8,
kWaveDistY = 9,
kWaveDistZ = 10,
kWaveDirX = 11,
kWaveDirY = 12,
kWaveSpeed = 13,
kNumConsts = 14,
};
};
#endif // PLGRASSSHADERMOD

View File

@ -0,0 +1,309 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayer.h"
#include "../plMessage/plAnimCmdMsg.h"
#include "hsStream.h"
#include "hsResMgr.h"
#include "hsMatrix44.h"
#include "hsGMatState.inl"
#include "../plMessage/plLayRefMsg.h"
#include "../plGImage/plBitmap.h"
#include "../plPipeline/hsGDeviceRef.h"
#include "plShader.h"
#include "plPipeline.h"
#include "plgDispatch.h"
#include "../pnMessage/plPipeResMakeMsg.h"
plLayer::plLayer()
{
fOwnedChannels = kTransform
| kPreshadeColor
| kRuntimeColor
| kAmbientColor
| kOpacity
| kState
| kUVWSrc
| kLODBias
| kSpecularColor
| kSpecularPower
| kTexture
| kVertexShader
| kPixelShader
| kBumpEnvXfm;
fTransform = TRACKED_NEW hsMatrix44;
fTransform->Reset();
fPreshadeColor = TRACKED_NEW hsColorRGBA;
fRuntimeColor = TRACKED_NEW hsColorRGBA;
fAmbientColor = TRACKED_NEW hsColorRGBA;
fSpecularColor = TRACKED_NEW hsColorRGBA;
fOpacity = TRACKED_NEW hsScalar;
fState = TRACKED_NEW hsGMatState;
fState->Reset();
fUVWSrc = TRACKED_NEW UInt32;
fLODBias = TRACKED_NEW hsScalar;
fSpecularPower = TRACKED_NEW hsScalar;
fTexture = TRACKED_NEW plBitmap*;
*fTexture = nil;
fVertexShader = TRACKED_NEW plShader*;
*fVertexShader = nil;
fPixelShader = TRACKED_NEW plShader*;
*fPixelShader = nil;
fBumpEnvXfm = TRACKED_NEW hsMatrix44;
fBumpEnvXfm->Reset();
}
plLayer::~plLayer()
{
}
UInt32 plLayer::Eval(double secs, UInt32 frame, UInt32 ignore)
{
return UInt32(0);
}
void plLayer::Read(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Read(s, mgr);
fState->Read(s);
fTransform->Read(s);
fPreshadeColor->Read(s);
fRuntimeColor->Read( s );
fAmbientColor->Read(s);
fSpecularColor->Read( s );
*fUVWSrc = s->ReadSwap32();
*fOpacity = s->ReadSwapScalar();
*fLODBias = s->ReadSwapScalar();
*fSpecularPower = s->ReadSwapScalar();
plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kTexture);
mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef);
#if 1 // For read/write shaders
refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kVertexShader);
mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef);
refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kPixelShader);
mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef);
fBumpEnvXfm->Read(s);
#endif // For read/write shaders
}
void plLayer::Write(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Write(s, mgr);
fState->Write(s);
fTransform->Write(s);
fPreshadeColor->Write(s);
fRuntimeColor->Write( s );
fAmbientColor->Write(s);
fSpecularColor->Write( s );
s->WriteSwap32(*fUVWSrc);
s->WriteSwapScalar(*fOpacity);
s->WriteSwapScalar(*fLODBias);
s->WriteSwapScalar(*fSpecularPower);
mgr->WriteKey(s, GetTexture());
mgr->WriteKey(s, GetVertexShader());
mgr->WriteKey(s, GetPixelShader());
fBumpEnvXfm->Write(s);
}
hsBool plLayer::MsgReceive(plMessage* msg)
{
plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg);
if( refMsg )
{
switch( refMsg->fType )
{
case plLayRefMsg::kTexture:
{
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
{
plBitmap *tex = plBitmap::ConvertNoRef(refMsg->GetRef());
*fTexture = tex;
if( tex )
plgDispatch::Dispatch()->RegisterForExactType(plPipeTexMakeMsg::Index(), GetKey());
else
plgDispatch::Dispatch()->UnRegisterForExactType(plPipeTexMakeMsg::Index(), GetKey());
}
else if( refMsg->GetContext() & (plRefMsg::kOnDestroy|plRefMsg::kOnRemove) )
{
*fTexture = nil;
plgDispatch::Dispatch()->UnRegisterForExactType(plPipeTexMakeMsg::Index(), GetKey());
}
}
return true;
case plLayRefMsg::kVertexShader:
{
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
{
plShader* shader = plShader::ConvertNoRef(refMsg->GetRef());
*fVertexShader = shader;
}
else if( refMsg->GetContext() & (plRefMsg::kOnDestroy|plRefMsg::kOnRemove) )
{
*fVertexShader = nil;
}
}
return true;
case plLayRefMsg::kPixelShader:
{
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
{
plShader* shader = plShader::ConvertNoRef(refMsg->GetRef());
*fPixelShader = shader;
}
else if( refMsg->GetContext() & (plRefMsg::kOnDestroy|plRefMsg::kOnRemove) )
{
*fPixelShader = nil;
}
}
return true;
}
}
plPipeTexMakeMsg* texMake = plPipeTexMakeMsg::ConvertNoRef(msg);
if( texMake )
{
texMake->Pipeline()->CheckTextureRef(this);
return true;
}
return plLayerInterface::MsgReceive(msg);
}
void plLayer::SetState(const hsGMatState& s)
{
*fState = s;
}
void plLayer::SetTransform(const hsMatrix44& xfm)
{
*fTransform = xfm;
}
void plLayer::SetBumpEnvMatrix(const hsMatrix44& xfm)
{
*fBumpEnvXfm = xfm;
}
plLayer& plLayer::InitToDefault()
{
fState->Reset();
*fTexture = nil;
SetRuntimeColor(hsColorRGBA().Set(0.5f, 0.5f, 0.5f, 1.f));
SetPreshadeColor(hsColorRGBA().Set(0.5f, 0.5f, 0.5f, 1.f));
SetAmbientColor(hsColorRGBA().Set(0,0,0,1.f));
SetOpacity(1.f);
fTransform->Reset();
SetUVWSrc(0);
SetLODBias(-1.f);
SetSpecularColor( hsColorRGBA().Set(0,0,0,1.f));
SetSpecularPower(1.f);
*fVertexShader = nil;
*fPixelShader = nil;
fBumpEnvXfm->Reset();
return *this;
}
plLayerInterface* plLayer::DefaultLayer()
{
static plLayer defLayer;
defLayer.InitToDefault();
return &defLayer;
}
//// CloneNoTexture ///////////////////////////////////////////////////////////
// Copies all the fields from the original layer given, not including the
// texture
void plLayer::CloneNoTexture( plLayerInterface *original )
{
SetBlendFlags( original->GetBlendFlags() );
SetClampFlags( original->GetClampFlags() );
SetShadeFlags( original->GetShadeFlags() );
SetZFlags( original->GetZFlags() );
SetMiscFlags( original->GetMiscFlags() );
SetState( original->GetState() );
SetPreshadeColor( original->GetPreshadeColor() );
SetRuntimeColor( original->GetRuntimeColor() );
SetAmbientColor( original->GetAmbientColor() );
SetSpecularColor( original->GetSpecularColor() );
SetOpacity( original->GetOpacity() );
SetTransform( original->GetTransform() );
SetUVWSrc( original->GetUVWSrc() );
SetLODBias( original->GetLODBias() );
SetSpecularPower( original->GetSpecularPower() );
SetVertexShader( original->GetVertexShader() );
SetPixelShader( original->GetPixelShader() );
SetBumpEnvMatrix( original->GetBumpEnvMatrix() );
}

View File

@ -0,0 +1,99 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayer_inc
#define plLayer_inc
#include "hsTemplates.h"
#include "plLayerInterface.h"
class plLayer : public plLayerInterface
{
protected:
public:
plLayer();
virtual ~plLayer();
CLASSNAME_REGISTER( plLayer );
GETINTERFACE_ANY( plLayer, plLayerInterface );
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
// Flat layer specifics
plLayer& InitToDefault();
void SetBlendFlags(UInt32 f) { fState->fBlendFlags = f; }
void SetClampFlags(UInt32 f) { fState->fClampFlags = f; }
void SetShadeFlags(UInt32 f) { fState->fShadeFlags = f; }
void SetZFlags(UInt32 f) { fState->fZFlags = f; }
void SetMiscFlags(UInt32 f) { fState->fMiscFlags = f; }
void SetState(const hsGMatState& state);
void SetTexture(plBitmap* t) { *fTexture = t; }
void SetPreshadeColor(const hsColorRGBA& col) { *fPreshadeColor = col; }
void SetRuntimeColor( const hsColorRGBA& col ) { *fRuntimeColor = col; }
void SetAmbientColor(const hsColorRGBA& col) { *fAmbientColor = col; }
void SetSpecularColor(const hsColorRGBA& col) { *fSpecularColor = col; }
void SetOpacity(hsScalar a) { *fOpacity = a; }
void SetTransform(const hsMatrix44& xfm);
void SetUVWSrc(UInt32 chan) { *fUVWSrc = chan; }
void SetLODBias(hsScalar f) { *fLODBias = f; }
void SetSpecularPower(hsScalar f) { *fSpecularPower = f; }
void SetVertexShader(plShader* shader) { *fVertexShader = shader; }
void SetPixelShader(plShader* shader) { *fPixelShader = shader; }
void SetBumpEnvMatrix(const hsMatrix44& xfm);
static plLayerInterface* DefaultLayer();
// Copies all the fields from the original layer given, not including the texture
void CloneNoTexture( plLayerInterface *original );
};
#endif // plLayerInterfaceStack_inc

View File

@ -0,0 +1,758 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "hsTimer.h"
#include "plLayerAnimation.h"
#include "../pnKeyedObject/plKey.h"
#include "../plInterp/plController.h"
#include "../plMessage/plAnimCmdMsg.h"
#include "../plMessage/plLinkToAgeMsg.h"
#include "../pnMessage/plSDLModifierMsg.h"
#include "../plModifier/plLayerSDLModifier.h"
#include "../pnMessage/plCameraMsg.h"
#include "../plNetClient/plLinkEffectsMgr.h"
#include "plgDispatch.h"
#include "hsResMgr.h"
#include "../plModifier/plSDLModifier.h"
#include "../plSDL/plSDL.h"
#include "../pnMessage/plSDLNotificationMsg.h"
#include "../plMessage/plAvatarMsg.h"
plLayerAnimationBase::plLayerAnimationBase()
:
fPreshadeColorCtl(nil),
fRuntimeColorCtl(nil),
fAmbientColorCtl(nil),
fSpecularColorCtl(nil),
fOpacityCtl(nil),
fTransformCtl(nil),
fEvalTime(-1.0),
fCurrentTime(-1.f),
fSegmentID(nil)
{
}
plLayerAnimationBase::~plLayerAnimationBase()
{
delete fPreshadeColorCtl;
delete fRuntimeColorCtl;
delete fAmbientColorCtl;
delete fSpecularColorCtl;
delete fOpacityCtl;
delete fTransformCtl;
delete [] fSegmentID;
}
void plLayerAnimationBase::Read(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Read(s, mgr);
fPreshadeColorCtl = plController::ConvertNoRef(mgr->ReadCreatable(s));
fRuntimeColorCtl = plController::ConvertNoRef( mgr->ReadCreatable( s ) );
fAmbientColorCtl = plController::ConvertNoRef(mgr->ReadCreatable(s));
fSpecularColorCtl = plController::ConvertNoRef(mgr->ReadCreatable(s));
fOpacityCtl = plController::ConvertNoRef(mgr->ReadCreatable(s));
fTransformCtl = plController::ConvertNoRef(mgr->ReadCreatable(s));
if( fOpacityCtl )
{
fOwnedChannels |= kOpacity;
fOpacity = TRACKED_NEW hsScalar;
}
if( fPreshadeColorCtl )
{
fOwnedChannels |= kPreshadeColor;
fPreshadeColor = TRACKED_NEW hsColorRGBA;
}
if( fRuntimeColorCtl )
{
fOwnedChannels |= kRuntimeColor;
fRuntimeColor = TRACKED_NEW hsColorRGBA;
}
if( fAmbientColorCtl )
{
fOwnedChannels |= kAmbientColor;
fAmbientColor = TRACKED_NEW hsColorRGBA;
}
if( fSpecularColorCtl )
{
fOwnedChannels |= kSpecularColor;
fSpecularColor = TRACKED_NEW hsColorRGBA;
}
if( fTransformCtl )
{
fOwnedChannels |= kTransform;
fTransform = TRACKED_NEW hsMatrix44;
}
fLength = IMakeUniformLength();
}
void plLayerAnimationBase::Write(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Write(s, mgr);
mgr->WriteCreatable(s, fPreshadeColorCtl);
mgr->WriteCreatable(s, fRuntimeColorCtl);
mgr->WriteCreatable(s, fAmbientColorCtl);
mgr->WriteCreatable(s, fSpecularColorCtl);
mgr->WriteCreatable(s, fOpacityCtl);
mgr->WriteCreatable(s, fTransformCtl);
}
plLayerInterface* plLayerAnimationBase::Attach(plLayerInterface* prev)
{
return plLayerInterface::Attach(prev);
}
void plLayerAnimationBase::IEvalConvertedTime(hsScalar secs, UInt32 passChans, UInt32 evalChans, UInt32 &dirty)
{
if( evalChans & kPreshadeColor )
{
fPreshadeColorCtl->Interp(fCurrentTime, fPreshadeColor);
dirty |= kPreshadeColor;
}
else if( passChans & kPreshadeColor )
{
*fPreshadeColor = fUnderLay->GetPreshadeColor();
}
if( evalChans & kRuntimeColor )
{
fRuntimeColorCtl->Interp( fCurrentTime, fRuntimeColor );
dirty |= kRuntimeColor;
}
else if( passChans & kRuntimeColor )
{
*fRuntimeColor = fUnderLay->GetRuntimeColor();
}
if( evalChans & kAmbientColor )
{
fAmbientColorCtl->Interp(fCurrentTime, fAmbientColor);
dirty |= kAmbientColor;
}
else if( passChans & kAmbientColor )
{
*fAmbientColor = fUnderLay->GetAmbientColor();
}
if( evalChans & kSpecularColor )
{
fSpecularColorCtl->Interp( fCurrentTime, fSpecularColor );
dirty |= kSpecularColor;
}
else if( passChans & kSpecularColor )
{
*fSpecularColor = fUnderLay->GetSpecularColor();
}
if( evalChans & kOpacity )
{
fOpacityCtl->Interp(fCurrentTime, fOpacity);
*fOpacity *= 1.e-2f;
dirty |= kOpacity;
}
else if( passChans & kOpacity )
{
*fOpacity = fUnderLay->GetOpacity();
}
if( evalChans & kTransform )
{
fTransformCtl->Interp(fCurrentTime, fTransform);
dirty |= kTransform;
}
else if( passChans & kTransform )
{
*fTransform = fUnderLay->GetTransform();
}
fPassThruChannels = 0; // already handled, don't need to keep passing them through.
}
hsBool plLayerAnimationBase::MsgReceive(plMessage* msg)
{
return plLayerInterface::MsgReceive(msg);
}
void plLayerAnimationBase::SetPreshadeColorCtl(plController* colCtl)
{
if( fPreshadeColorCtl )
delete fPreshadeColorCtl;
else
fPreshadeColor = TRACKED_NEW hsColorRGBA;
fOwnedChannels |= kPreshadeColor;
fPreshadeColorCtl = colCtl;
}
void plLayerAnimationBase::SetRuntimeColorCtl(plController* colCtl)
{
if( fRuntimeColorCtl )
delete fRuntimeColorCtl;
else
fRuntimeColor = TRACKED_NEW hsColorRGBA;
fOwnedChannels |= kRuntimeColor;
fRuntimeColorCtl = colCtl;
}
void plLayerAnimationBase::SetAmbientColorCtl(plController* ambCtl)
{
if( fAmbientColorCtl )
delete fAmbientColorCtl;
else
fAmbientColor = TRACKED_NEW hsColorRGBA;
fOwnedChannels |= kAmbientColor;
fAmbientColorCtl = ambCtl;
}
void plLayerAnimationBase::SetSpecularColorCtl(plController* ambCtl)
{
if( fSpecularColorCtl )
delete fSpecularColorCtl;
else
fSpecularColor = TRACKED_NEW hsColorRGBA;
fOwnedChannels |= kSpecularColor;
fSpecularColorCtl = ambCtl;
}
void plLayerAnimationBase::SetOpacityCtl(plController* opaCtl)
{
if( fOpacityCtl )
delete fOpacityCtl;
else
fOpacity = TRACKED_NEW hsScalar;
fOwnedChannels |= kOpacity;
fOpacityCtl = opaCtl;
}
void plLayerAnimationBase::SetTransformCtl(plController* xfmCtl)
{
if( fTransformCtl )
delete fTransformCtl;
else
fTransform = TRACKED_NEW hsMatrix44;
fOwnedChannels |= kTransform;
fTransformCtl = xfmCtl;
}
hsScalar plLayerAnimationBase::IMakeUniformLength()
{
fLength = 0;
if( fPreshadeColorCtl && (fPreshadeColorCtl->GetLength() > fLength) )
fLength = fPreshadeColorCtl->GetLength();
if( fRuntimeColorCtl && (fRuntimeColorCtl->GetLength() > fLength) )
fLength = fRuntimeColorCtl->GetLength();
if( fAmbientColorCtl && (fAmbientColorCtl->GetLength() > fLength) )
fLength = fAmbientColorCtl->GetLength();
if( fSpecularColorCtl && (fSpecularColorCtl->GetLength() > fLength) )
fLength = fSpecularColorCtl->GetLength();
if( fOpacityCtl && (fOpacityCtl->GetLength() > fLength) )
fLength = fOpacityCtl->GetLength();
if( fTransformCtl && (fTransformCtl->GetLength() > fLength) )
fLength = fTransformCtl->GetLength();
return fLength;
}
/////////////////////////////////////////////////////////////////////////////////
plLayerAnimation::plLayerAnimation()
:
plLayerAnimationBase(),
fLayerSDLMod(nil)
{
fTimeConvert.SetOwner(this);
}
plLayerAnimation::~plLayerAnimation()
{
delete fLayerSDLMod;
}
void plLayerAnimation::Read(hsStream* s, hsResMgr* mgr)
{
plLayerAnimationBase::Read(s, mgr);
fTimeConvert.Read(s, mgr);
if (!(fTimeConvert.IsStopped()))
{
plSynchEnabler ps(true); // enable dirty tracking so that we send state about
// the anim resetting to start now.
fTimeConvert.SetCurrentAnimTime(0, true);
}
Eval(hsTimer::GetSysSeconds(),0,0);
// add sdl modifier
delete fLayerSDLMod;
fLayerSDLMod = TRACKED_NEW plLayerSDLModifier;
fLayerSDLMod->SetLayerAnimation(this);
}
void plLayerAnimation::Write(hsStream* s, hsResMgr* mgr)
{
plLayerAnimationBase::Write(s, mgr);
fTimeConvert.Write(s, mgr);
}
plLayerInterface* plLayerAnimation::Attach(plLayerInterface* prev)
{
fCurrentTime = fTimeConvert.CurrentAnimTime()-1.f;
return plLayerAnimationBase::Attach(prev);
}
UInt32 plLayerAnimation::Eval(double wSecs, UInt32 frame, UInt32 ignore)
{
UInt32 dirty = plLayerInterface::Eval(wSecs, frame, ignore);
if( wSecs != fEvalTime )
{
UInt32 evalChans = 0;
UInt32 passChans = dirty | fPassThruChannels;
hsScalar secs = fTimeConvert.WorldToAnimTime(wSecs);
if( secs != fCurrentTime )
{
evalChans = fOwnedChannels & ~ignore & ~fPassThruChannels;
fCurrentTime = secs;
}
IEvalConvertedTime(secs, passChans, evalChans, dirty);
}
fEvalTime = wSecs;
return dirty;
}
hsBool plLayerAnimation::MsgReceive(plMessage* msg)
{
// pass sdl msg to sdlMod
plSDLModifierMsg* sdlMsg = plSDLModifierMsg::ConvertNoRef(msg);
if (sdlMsg && fLayerSDLMod)
{
if (fLayerSDLMod->MsgReceive(sdlMsg))
return true; // msg handled
}
hsBool retVal = false;
plAnimCmdMsg* cmdMsg = plAnimCmdMsg::ConvertNoRef(msg);
if( cmdMsg )
{
// Evaluate first, so we'll be transitioning from our
// real current state, whether we've been evaluated (in view)
// lately or not.
TopOfStack()->Eval(hsTimer::GetSysSeconds(), 0, 0);
retVal = fTimeConvert.HandleCmd(cmdMsg);
DirtySynchState(kSDLLayer, 0);
}
if( retVal )
{
if( !fTimeConvert.IsStopped() || fTimeConvert.GetFlag(plAnimTimeConvert::kForcedMove) )
{
ClaimChannels(fOwnedChannels);
fCurrentTime = -1.f; // force an eval
}
}
else
{
retVal = plLayerAnimationBase::MsgReceive(msg);
}
return retVal;
}
void plLayerAnimation::DefaultAnimation()
{
IMakeUniformLength();
fTimeConvert.SetBegin(0);
fTimeConvert.SetEnd(fLength);
fTimeConvert.SetLoopPoints(0,fLength);
fTimeConvert.Loop();
fTimeConvert.Start();
}
///////////////////////////////////////////////////////////////////////////////////////
plLayerLinkAnimation::plLayerLinkAnimation() :
fLinkKey(nil),
fLeavingAge(true),
fEnabled(true),
fFadeFlags(0),
fLastFadeFlag(0),
fFadeFlagsDirty(false)
{
fIFaceCallback = TRACKED_NEW plEventCallbackMsg();
fIFaceCallback->fEvent = kTime;
fIFaceCallback->fRepeats = 0;
}
plLayerLinkAnimation::~plLayerLinkAnimation()
{
hsRefCnt_SafeUnRef(fIFaceCallback);
}
void plLayerLinkAnimation::Read(hsStream* s, hsResMgr* mgr)
{
plLayerAnimation::Read(s, mgr);
fLinkKey = mgr->ReadKey(s);
fLeavingAge = s->ReadBool();
plgDispatch::Dispatch()->RegisterForExactType(plLinkEffectBCMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plLinkEffectPrepBCMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plCameraTargetFadeMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plAvatarStealthModeMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plIfaceFadeAvatarMsg::Index(), GetKey());
plgDispatch::Dispatch()->RegisterForExactType(plPseudoLinkAnimTriggerMsg::Index(), GetKey());
fIFaceCallback->AddReceiver(GetKey());
}
void plLayerLinkAnimation::Write(hsStream* s, hsResMgr* mgr)
{
plLayerAnimation::Write(s, mgr);
mgr->WriteKey(s, fLinkKey);
s->WriteBool(fLeavingAge);
}
UInt32 plLayerLinkAnimation::Eval(double wSecs, UInt32 frame, UInt32 ignore)
{
UInt32 dirty = plLayerInterface::Eval(wSecs, frame, ignore);
if (wSecs != fEvalTime)
{
UInt32 evalChans = 0;
UInt32 passChans = dirty | fPassThruChannels;
hsScalar oldAnimTime = fTimeConvert.CurrentAnimTime();
hsScalar secs = oldAnimTime;
if (fFadeFlagsDirty)
{
hsScalar goal = 0.f;
if (fFadeFlags & kFadeLinkPrep)
secs = goal = fLength;
else
{
hsScalar rate = 0.f;
hsScalar delta = (hsScalar)(wSecs - fEvalTime);
if (fFadeFlags & kFadeLinking)
{
goal = fLength;
rate = 1.f;
}
else if (fFadeFlags & kFadeCamera)
{
goal = fLength;
rate = 10.f;
}
else if (fFadeFlags & (kFadeIFace | kFadeCCR))
{
goal = fLength * 0.4f;
rate = 10.f;
}
else if (fFadeFlags == 0)
{
goal = 0.f;
if (fLastFadeFlag == kFadeLinking)
rate = 1.f;
else
rate = 10.f;
}
if (fabs(oldAnimTime - goal) < delta * rate || rate == 0)
secs = goal;
else if (goal > oldAnimTime)
secs = oldAnimTime + delta * rate;
else
secs = oldAnimTime - delta * rate;
}
if (secs == goal)
fFadeFlagsDirty = false;
}
if( secs != fCurrentTime )
{
fTimeConvert.SetCurrentAnimTime(secs);
if (secs == 0.f || oldAnimTime == 0.f)
{
// Either we're going opaque, or we were opaque and now we're fading.
// Tell the armature to re-eval its opacity settings.
plAvatarOpacityCallbackMsg *opacityMsg = TRACKED_NEW plAvatarOpacityCallbackMsg(fLinkKey, kStop);
opacityMsg->SetBCastFlag(plMessage::kPropagateToModifiers);
opacityMsg->Send();
}
evalChans = fOwnedChannels & ~ignore & ~fPassThruChannels;
fCurrentTime = secs;
}
IEvalConvertedTime(secs, passChans, evalChans, dirty);
}
fEvalTime = wSecs;
return dirty;
}
void plLayerLinkAnimation::SetFadeFlag(UInt8 flag, hsBool val)
{
if (val)
fFadeFlags |= flag;
else
fFadeFlags &= ~flag;
if (fFadeFlags == 0)
fLastFadeFlag = flag;
TopOfStack()->Eval(hsTimer::GetSysSeconds(), 0, 0);
ClaimChannels(fOwnedChannels);
fCurrentTime = -1; // force eval
fFadeFlagsDirty = true;
}
hsBool plLayerLinkAnimation::MsgReceive( plMessage* pMsg )
{
plLinkEffectPrepBCMsg *bcpMsg = plLinkEffectPrepBCMsg::ConvertNoRef(pMsg);
if (bcpMsg != nil)
{
if (bcpMsg->fLinkKey != fLinkKey || bcpMsg->fLeavingAge)
return true;
SetFadeFlag(kFadeLinkPrep, true);
return true;
}
plLinkEffectBCMsg *msg = plLinkEffectBCMsg::ConvertNoRef(pMsg);
if (msg != nil)
{
if (msg->fLinkKey == fLinkKey)
{
SetFadeFlag(kFadeLinkPrep, false);
if (msg->HasLinkFlag(plLinkEffectBCMsg::kLeavingAge))
SetFadeFlag(kFadeLinking, true);
else
SetFadeFlag(kFadeLinking, false);
if (msg->HasLinkFlag(plLinkEffectBCMsg::kSendCallback))
{
plLinkEffectsMgr *mgr;
if (mgr = plLinkEffectsMgr::ConvertNoRef(msg->GetSender()->ObjectIsLoaded()))
mgr->WaitForEffect(msg->fLinkKey, fTimeConvert.GetEnd() - fTimeConvert.GetBegin());
}
}
return true;
}
plPseudoLinkAnimTriggerMsg* pSeudoMsg = plPseudoLinkAnimTriggerMsg::ConvertNoRef(pMsg);
if (pSeudoMsg)
{
if (fLinkKey != pSeudoMsg->fAvatarKey)
return true;
if (pSeudoMsg->fForward)
SetFadeFlag(kFadeLinking, true);
else
SetFadeFlag(kFadeLinking, false);
// add a callback for when it's done if it's in forward
plLinkEffectsMgr *mgr;
if (mgr = plLinkEffectsMgr::ConvertNoRef(pMsg->GetSender()->ObjectIsLoaded()))
if (pSeudoMsg->fForward)
mgr->WaitForPseudoEffect(fLinkKey, fTimeConvert.GetEnd() - fTimeConvert.GetBegin());
return true;
}
// used to fade the player in or out when entering / exiting first person mode
// or when distance between camera and player is too small...
plCameraTargetFadeMsg* fMsg = plCameraTargetFadeMsg::ConvertNoRef(pMsg);
if (fMsg)
{
if (fLinkKey != fMsg->GetSubjectKey())
return true;
if (fMsg->FadeOut())
SetFadeFlag(kFadeCamera, true);
else
SetFadeFlag(kFadeCamera, false);
return true;
}
plIfaceFadeAvatarMsg* iMsg = plIfaceFadeAvatarMsg::ConvertNoRef(pMsg);
if (iMsg)
{
if (fLinkKey != iMsg->GetSubjectKey())
return true;
if (iMsg->GetEnable())
{
Enable(true);
}
else if (iMsg->GetDisable())
{
Enable(false); // disable and un-fade
SetFadeFlag(kFadeIFace, false);
}
else
if (fEnabled)
{
if (iMsg->FadeOut())
SetFadeFlag(kFadeIFace, true);
else
SetFadeFlag(kFadeIFace, false);
}
return true;
}
plAvatarStealthModeMsg *sMsg = plAvatarStealthModeMsg::ConvertNoRef(pMsg);
if (sMsg)
{
if (sMsg->GetSender() == fLinkKey)
{
if (sMsg->fMode == plAvatarStealthModeMsg::kStealthCloakedButSeen)
{
SetFadeFlag(kFadeCCR, true);
}
else if (sMsg->fMode == plAvatarStealthModeMsg::kStealthVisible)
{
SetFadeFlag(kFadeCCR, false);
}
// Don't need to set opacity if we're fully cloaked, since we won't
// even be drawing the spans (due to plEnableMsg() on the sceneObject)
}
return true;
}
return plLayerAnimation::MsgReceive( pMsg );
}
///////////////////////////////////////////////////////////////////////////////////////////////
plLayerSDLAnimation::plLayerSDLAnimation() : plLayerAnimationBase(), fVar(nil), fVarName(nil) {}
plLayerSDLAnimation::~plLayerSDLAnimation()
{
delete [] fVarName;
}
UInt32 plLayerSDLAnimation::Eval(double wSecs, UInt32 frame, UInt32 ignore)
{
UInt32 dirty = plLayerInterface::Eval(wSecs, frame, ignore);
if( wSecs != fEvalTime )
{
UInt32 evalChans = 0;
UInt32 passChans = dirty | fPassThruChannels;
if (fEvalTime < 0)
{
if (fVarName != nil)
{
extern const plSDLModifier *ExternFindAgeSDL();
const plSDLModifier *sdlMod = ExternFindAgeSDL();
if (sdlMod)
{
fVar = sdlMod->GetStateCache()->FindVar(fVarName);
if (fVar)
sdlMod->AddNotifyForVar(GetKey(), fVarName, 0);
}
}
}
hsScalar secs;
if (fVar)
fVar->Get(&secs);
else
secs = 0.f;
// We're guaranteed a 0-1 time. Scale that to our animation length.
secs *= GetLength();
if( secs != fCurrentTime )
{
evalChans = fOwnedChannels & ~ignore & ~fPassThruChannels;
fCurrentTime = secs;
}
IEvalConvertedTime(secs, passChans, evalChans, dirty);
}
fEvalTime = wSecs;
return dirty;
}
hsBool plLayerSDLAnimation::MsgReceive(plMessage* msg)
{
plSDLNotificationMsg* nMsg = plSDLNotificationMsg::ConvertNoRef(msg);
if (nMsg)
{
TopOfStack()->Eval(hsTimer::GetSysSeconds(), 0, 0);
ClaimChannels(fOwnedChannels);
return true;
}
return plLayerAnimationBase::MsgReceive(msg);
}
void plLayerSDLAnimation::Read(hsStream* s, hsResMgr* mgr)
{
plLayerAnimationBase::Read(s, mgr);
fVarName = s->ReadSafeString();
}
void plLayerSDLAnimation::Write(hsStream* s, hsResMgr* mgr)
{
plLayerAnimationBase::Write(s, mgr);
s->WriteSafeString(fVarName);
}
void plLayerSDLAnimation::SetVarName(char *name)
{
delete [] fVarName;
fVarName = hsStrcpy(name);
}

View File

@ -0,0 +1,212 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerAnimation_inc
#define plLayerAnimation_inc
#include "plLayerInterface.h"
#include "../plInterp/plAnimTimeConvert.h"
class plMessage;
class plController;
class plLayerSDLModifier;
class plSimpleStateVariable;
// LayerAnimations take advantage of the simplifying
// factor that they are write only. That is, it always
// overwrites the output of previous interfaces with
// the current value of the animation. Unanimated channels
// are unaffected.
class plLayerAnimationBase : public plLayerInterface
{
protected:
char* fSegmentID;
double fEvalTime;
hsScalar fCurrentTime;
hsScalar fLength;
plController* fPreshadeColorCtl;
plController* fRuntimeColorCtl;
plController* fAmbientColorCtl;
plController* fSpecularColorCtl;
plController* fOpacityCtl;
plController* fTransformCtl;
hsScalar IMakeUniformLength();
void IEvalConvertedTime(hsScalar secs, UInt32 passChans, UInt32 evalChans, UInt32 &dirty);
public:
plLayerAnimationBase();
virtual ~plLayerAnimationBase();
CLASSNAME_REGISTER( plLayerAnimationBase );
GETINTERFACE_ANY( plLayerAnimationBase, plLayerInterface );
virtual plLayerInterface* Attach(plLayerInterface* prev);
//virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore) = 0;
virtual hsBool MsgReceive(plMessage* msg);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
// Specialized
hsScalar GetLength() const { return fLength; }
char *GetSegmentID() const { return fSegmentID; }
void SetSegmentID(char *ID) { delete fSegmentID; fSegmentID = hsStrcpy(ID); }
// Export construction functions follow
void SetPreshadeColorCtl(plController* colCtl);
void SetRuntimeColorCtl( plController *colCtl );
void SetAmbientColorCtl(plController* ambCtl);
void SetSpecularColorCtl(plController* ambCtl);
void SetOpacityCtl(plController* opaCtl);
void SetTransformCtl(plController* xfmCtl);
plController* GetPreshadeColorCtl() const { return fPreshadeColorCtl; }
plController* GetRuntimeColorCtl() const { return fRuntimeColorCtl; }
plController* GetAmbientColorCtl() const { return fAmbientColorCtl; }
plController* GetSpecularColorCtl() const { return fSpecularColorCtl; }
plController* GetOpacityCtl() const { return fOpacityCtl; }
plController* GetTransformCtl() const { return fTransformCtl; }
};
class plLayerAnimation : public plLayerAnimationBase
{
friend class plLayerSDLModifier;
protected:
plAnimTimeConvert fTimeConvert;
plLayerSDLModifier* fLayerSDLMod; // handles sending/recving sdl state
public:
plLayerAnimation();
virtual ~plLayerAnimation();
CLASSNAME_REGISTER( plLayerAnimation );
GETINTERFACE_ANY( plLayerAnimation, plLayerAnimationBase );
virtual plLayerInterface* Attach(plLayerInterface* prev);
virtual UInt32 Eval(double wSecs, UInt32 frame, UInt32 ignore);
virtual hsBool MsgReceive(plMessage* msg);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
const plLayerSDLModifier* GetSDLModifier() const { return fLayerSDLMod; }
plAnimTimeConvert& GetTimeConvert() { return fTimeConvert; }
void DefaultAnimation();
};
class plLayerLinkAnimation : public plLayerAnimation
{
protected:
plKey fLinkKey;
hsBool fEnabled;
plEventCallbackMsg *fIFaceCallback;
enum
{
kFadeLinkPrep = 0x01,
kFadeLinking = 0x02,
kFadeCamera = 0x04,
kFadeIFace = 0x08,
kFadeCCR = 0x10,
};
UInt8 fFadeFlags;
UInt8 fLastFadeFlag;
hsBool fFadeFlagsDirty;
public:
plLayerLinkAnimation();
~plLayerLinkAnimation();
CLASSNAME_REGISTER( plLayerLinkAnimation );
GETINTERFACE_ANY( plLayerLinkAnimation, plLayerAnimation );
void SetLinkKey(plKey linkKey) { fLinkKey = linkKey; }
plKey GetLinkKey() { return fLinkKey; }
// NOTE: The link animation should NEVER NEVER NEVER send its state to the server.
// NEVER!
// If you think it should... talk to Bob. He will explain why it can't be, and beat you up.
// If he can't remember, beat him up until he does (or ask Moose).
virtual hsBool DirtySynchState(const char* sdlName, UInt32 sendFlags) { return false; } // don't send link state
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual UInt32 Eval(double wSecs, UInt32 frame, UInt32 ignore);
virtual hsBool MsgReceive(plMessage* pMsg);
void Enable(hsBool b) { fEnabled = b; }
void SetFadeFlag(UInt8 flag, hsBool val);
hsBool fLeavingAge;
};
class plLayerSDLAnimation : public plLayerAnimationBase
{
protected:
plSimpleStateVariable *fVar;
char *fVarName;
public:
plLayerSDLAnimation();
virtual ~plLayerSDLAnimation();
CLASSNAME_REGISTER( plLayerSDLAnimation );
GETINTERFACE_ANY( plLayerSDLAnimation, plLayerAnimationBase );
virtual UInt32 Eval(double wSecs, UInt32 frame, UInt32 ignore);
virtual hsBool MsgReceive(plMessage* msg);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
char *GetVarName() { return fVarName; }
void SetVarName(char *name);
};
#endif // plLayerAnimation_inc

View File

@ -0,0 +1,63 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayerDepth.h"
plLayerDepth::plLayerDepth()
{
SetZFlags(hsGMatState::kZNoZRead | hsGMatState::kZNoZWrite);
SetBlendFlags(hsGMatState::kBlendAdd);
SetMiscFlags(hsGMatState::kMiscRestartPassHere | hsGMatState::kMiscTroubledLoner);
SetPreshadeColor(hsColorRGBA().Set(0,0,0,1.f));
SetRuntimeColor(hsColorRGBA().Set(0,0,0,1.f));
SetAmbientColor(hsColorRGBA().Set(0.1f, 0.1f, 0.1f, 1.f));
SetOpacity(1.f);
*fTexture = nil;
}
plLayerDepth::~plLayerDepth()
{
}

View File

@ -0,0 +1,59 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerDepth_inc
#define plLayerDepth_inc
#include "plLayer.h"
class plLayerDepth : public plLayer
{
public:
plLayerDepth();
virtual ~plLayerDepth();
CLASSNAME_REGISTER( plLayerDepth );
GETINTERFACE_ANY( plLayerDepth, plLayer );
};
#endif plLayerDepth_inc

View File

@ -0,0 +1,375 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayerInterface.h"
#include "../plMessage/plLayRefMsg.h"
#include "plLayer.h"
#include "hsMatrix44.h"
#include "hsGMatState.h"
#include "hsResMgr.h"
#include "../pnNetCommon/plSDLTypes.h"
plLayerInterface::plLayerInterface()
: fUnderLay(nil),
fOverLay(nil),
fState(nil),
fTransform(nil),
fPreshadeColor(nil),
fRuntimeColor(nil),
fAmbientColor(nil),
fOpacity(nil),
fTexture(nil),
fUVWSrc(nil),
fLODBias(nil),
fSpecularColor(nil),
fSpecularPower(nil),
fOwnedChannels(0),
fPassThruChannels(0),
fVertexShader(nil),
fPixelShader(nil),
fBumpEnvXfm(nil)
{
}
plLayerInterface::~plLayerInterface()
{
if( fUnderLay )
Detach(fUnderLay);
delete fState;
delete fPreshadeColor;
delete fRuntimeColor;
delete fAmbientColor;
delete fSpecularColor;
delete fOpacity;
delete fTransform;
delete fTexture;
delete fUVWSrc;
delete fLODBias;
delete fSpecularPower;
delete fVertexShader;
delete fPixelShader;
delete fBumpEnvXfm;
}
void plLayerInterface::ISetPassThru(UInt32 chans)
{
fPassThruChannels |= chans;
if( fOverLay )
fOverLay->ISetPassThru(chans);
// Since plLayerAnimation is the only derived class that uses its
// fPassThruChannels info, it's the only one that actually saves
// it to state.
DirtySynchState(kSDLLayer, 0);
}
// The arbitration rules for different layers on the same stack
// wanting to control the same channel are currently:
// 1) Only one write-only value setter can be active at a time,
// otherwise results are undefined.
// 2) A layer will only become active due to receiving a message.
// 3) A channel value for the stack is the value as set by the
// last layer that was active. If no layers have ever been
// active, the value is the static value of the bottom of the stack.
// 4) Since the stack is only Eval'd when visible, the third rule
// must appear to be true when different layers become active
// and inactive without ever having been Eval'd.
// 5) Taking advantage of rules 1) and 2), it follows that the last
// layer to have become active on response to a message is also
// the last layer to have been active.
// 6) So when a layer becomes active in it's MsgReceive(), it notifies
// all channels above it that it now owns its channels, and they
// should just pass through those channel values.
// Note that a layer may claim ownership of its channels but then lose
// ownership (because another layer went active) before ever having
// been Eval'd.
void plLayerInterface::ClaimChannels(UInt32 chans)
{
if( fOverLay )
fOverLay->ISetPassThru(chans);
fPassThruChannels &= ~chans;
DirtySynchState(kSDLLayer, 0);
}
UInt32 plLayerInterface::Eval(double secs, UInt32 frame, UInt32 ignore)
{
if( fUnderLay )
return fUnderLay->Eval(secs, frame, ignore);
return UInt32(0);
}
// Export Only
void plLayerInterface::AttachViaNotify(plLayerInterface *prev)
{
plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay);
hsgResMgr::ResMgr()->AddViaNotify(prev->GetKey(), refMsg, plRefFlags::kActiveRef);
}
plLayerInterface* plLayerInterface::Attach(plLayerInterface* prev)
{
if( !prev )
return this;
if( fUnderLay == prev )
return this;
if( fUnderLay )
{
fUnderLay->Attach(prev);
prev = fUnderLay;
}
if( !OwnChannel(kState) )
fState = prev->fState;
if( !OwnChannel(kPreshadeColor) )
fPreshadeColor = prev->fPreshadeColor;
if( !OwnChannel( kRuntimeColor ) )
fRuntimeColor = prev->fRuntimeColor;
if( !OwnChannel(kAmbientColor) )
fAmbientColor = prev->fAmbientColor;
if( !OwnChannel( kSpecularColor ) )
fSpecularColor = prev->fSpecularColor;
if( !OwnChannel(kOpacity) )
fOpacity = prev->fOpacity;
if( !OwnChannel(kTransform) )
fTransform = prev->fTransform;
if( !OwnChannel(kTexture) )
fTexture = prev->fTexture;
if( !OwnChannel(kUVWSrc) )
fUVWSrc = prev->fUVWSrc;
if( !OwnChannel(kLODBias) )
fLODBias = prev->fLODBias;
if( !OwnChannel(kSpecularPower) )
fSpecularPower = prev->fSpecularPower;
if( !OwnChannel(kVertexShader) )
fVertexShader = prev->fVertexShader;
if( !OwnChannel(kPixelShader) )
fPixelShader = prev->fPixelShader;
if( !OwnChannel(kBumpEnvXfm) )
fBumpEnvXfm = prev->fBumpEnvXfm;
fUnderLay = prev;
prev->fOverLay = this;
return this;
}
void plLayerInterface::IUnthread()
{
if( fUnderLay )
{
if( !OwnChannel(kState) )
fState = nil;
if( !OwnChannel(kPreshadeColor) )
fPreshadeColor = nil;
if( !OwnChannel( kRuntimeColor ) )
fRuntimeColor = nil;
if( !OwnChannel(kAmbientColor) )
fAmbientColor = nil;
if( !OwnChannel( kSpecularColor ) )
fSpecularColor = nil;
if( !OwnChannel(kOpacity) )
fOpacity = nil;
if( !OwnChannel(kTransform) )
fTransform = nil;
if( !OwnChannel(kTexture) )
fTexture = nil;
if( !OwnChannel(kUVWSrc) )
fUVWSrc = nil;
if( !OwnChannel(kLODBias) )
fLODBias = nil;
if( !OwnChannel(kSpecularPower) )
fSpecularPower = nil;
if( !OwnChannel(kVertexShader) )
fVertexShader = nil;
if( !OwnChannel(kPixelShader) )
fPixelShader = nil;
if( !OwnChannel(kBumpEnvXfm) )
fBumpEnvXfm = nil;
fUnderLay->fOverLay = nil;
fUnderLay = nil;
}
}
// Detach:
// If we are the one being detached, break our links to underlay
// and then return nil, since everything has just been detached
// from the stack.
// If our underlay is the one being detached, we need to unthread from it
// and return ourselves.
// If it's not us, and not our underlay, just pass it to our underlay and let
// it deal.
//
// Return value is new TOP of stack. li is now top of a separate stack.
plLayerInterface* plLayerInterface::Detach(plLayerInterface* li)
{
if( li == this )
return nil;
if( li == fUnderLay )
{
IUnthread();
return this;
}
fUnderLay->Detach(li);
return this;
}
// Remove:
// If we are the one being removed, break our links to underlay
// and then just return underlay, since it doesn't even know
// about our existence (so it doesn't need to know about the remove).
// If our underlay is the one being removed, we need to unthread it from
// its underlay (if any), and then thread ourselves onto the underlay's
// former underlay.
// If it's not us, and not our underlay, just pass it to our underlay and let
// it deal.
//
// Return value is new TOP of stack.
plLayerInterface* plLayerInterface::Remove(plLayerInterface* li)
{
plLayerInterface* under = fUnderLay;
if( li == this )
{
IUnthread();
return under;
}
// This is an error, because it means we're being asked
// to detach from something we aren't attached to.
if( !under )
{
hsAssert(false, "Detaching from unknown layerinterface");
return this;
}
IUnthread();
plLayerInterface* newUnderLay = under->Remove(li);
Attach(newUnderLay);
return this;
}
plLayerInterface *plLayerInterface::GetAttached()
{
return fUnderLay;
}
void plLayerInterface::Read(hsStream* s, hsResMgr* mgr)
{
plSynchedObject::Read(s, mgr);
plLayRefMsg* refMsg = TRACKED_NEW plLayRefMsg(GetKey(), plRefMsg::kOnCreate, 0, plLayRefMsg::kUnderLay);
plKey key = mgr->ReadKeyNotifyMe(s,refMsg, plRefFlags::kActiveRef);
if( key && !fUnderLay )
Attach(plLayer::DefaultLayer());
// Temporary setting default netgroup by our key.
SetNetGroup(SelectNetGroup(GetKey()));
}
void plLayerInterface::Write(hsStream* s, hsResMgr* mgr)
{
plSynchedObject::Write(s, mgr);
mgr->WriteKey(s, fUnderLay);
}
hsBool plLayerInterface::MsgReceive(plMessage* msg)
{
plLayRefMsg* refMsg = plLayRefMsg::ConvertNoRef(msg);
if( refMsg )
{
switch( refMsg->fType )
{
case plLayRefMsg::kUnderLay:
{
plLayerInterface* underLay = plLayerInterface::ConvertNoRef(refMsg->GetRef());
if( refMsg->GetContext() & (plRefMsg::kOnCreate|plRefMsg::kOnRequest|plRefMsg::kOnReplace) )
{
if( fUnderLay )
Detach(fUnderLay);
Attach(underLay);
}
else if( refMsg->GetContext() & (plRefMsg::kOnDestroy|plRefMsg::kOnRemove) )
{
Detach(fUnderLay);
}
return true;
}
}
}
return plSynchedObject::MsgReceive(msg);
}

View File

@ -0,0 +1,220 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerInterface_inc
#define plLayerInterface_inc
#include "../pnNetCommon/plSynchedValue.h"
#include "../pnNetCommon/plSynchedObject.h"
#include "hsGMatState.h"
struct hsMatrix44;
struct hsColorRGBA;
class plBitmap;
class plMessage;
class hsGMatState;
class plShader;
class plLayerInterface : public plSynchedObject
{
friend class plLayerSDLModifier;
public:
enum plLayerDirtyBits {
kTransform = 0x1,
kPreshadeColor = 0x2,
kAmbientColor = 0x4,
kOpacity = 0x8,
kTexture = 0x10,
kState = 0x20,
kUVWSrc = 0x40,
kLODBias = 0x80,
kSpecularColor = 0x100,
kSpecularPower = 0x200,
kRuntimeColor = 0x400,
kVertexShader = 0x800,
kPixelShader = 0x1000,
kBumpEnvXfm = 0x2000,
kAllDirty = 0xffffffff
};
enum plUVWSrcModifiers {
kUVWPassThru = 0x00000000,
kUVWIdxMask = 0x0000ffff,
kUVWNormal = 0x00010000,
kUVWPosition = 0x00020000,
kUVWReflect = 0x00030000
};
protected:
plLayerInterface* fUnderLay;
plLayerInterface* fOverLay;
// NEVER MODIFY A FIELD THAT ISN'T
// YOUR OWN PERSONAL COPY.
// These are accessible so that if you're interface doesn't touch a field,
// it can set it's pointer to the previous interfaces pointer to that field
// and never even do a copy. For any fields this interface will alter, you
// need to alloc your own copy, and in your eval get the previous interface's
// value, modify it, and write it to your copy.
// So, if you don't touch a field, copy the pointer from prev into your channel pointer,
// else alloc your own and set the value to whatever you like.
// Then you only need to update your value when the source value changes (you'll know
// from dirty bits), or when you want to (you'll know from secs/frame).
// fOwnedChannels specifies which channels you have allocated and own (and will delete)
UInt32 fOwnedChannels;
// fPassThruChannels are channels which we need to pass through our underlay's values,
// even if we have a differing opinion on what the value should be. This let's us arbitrate
// between different layers that control the same channels. A layer can claim control of
// a channel by telling all other layers to pass through that channel via the
// ClaimChannels(UInt32 chans) member function. See .cpp for arbitration rules.
UInt32 fPassThruChannels;
hsMatrix44* fTransform;
hsColorRGBA* fPreshadeColor;
hsColorRGBA* fRuntimeColor; // Diffuse color to be used with runtime lights vs. static preshading
hsColorRGBA* fAmbientColor;
hsColorRGBA* fSpecularColor;
hsScalar* fOpacity;
// Would like to abstract out the mipmap, but we'll bring it
// along for now.
plBitmap** fTexture;
// (Currently) unanimatables.
hsGMatState* fState;
UInt32* fUVWSrc;
hsScalar* fLODBias;
hsScalar* fSpecularPower;
plShader** fVertexShader;
plShader** fPixelShader;
hsMatrix44* fBumpEnvXfm;
void IUnthread();
void ISetPassThru(UInt32 chans);
public:
plLayerInterface();
virtual ~plLayerInterface();
CLASSNAME_REGISTER( plLayerInterface );
GETINTERFACE_ANY( plLayerInterface, plSynchedObject );
plLayerInterface* BottomOfStack() { return fUnderLay ? fUnderLay->BottomOfStack() : this; }
plLayerInterface* TopOfStack() { return fOverLay ? fOverLay->TopOfStack() : this; }
// Used by debug code.
plLayerInterface* GetUnderLay() { return fUnderLay; }
plLayerInterface* GetOverLay() { return fOverLay; }
const hsMatrix44& GetTransform() const { return *fTransform; }
const hsColorRGBA& GetPreshadeColor() const { return *fPreshadeColor; }
const hsColorRGBA& GetRuntimeColor() const { return *fRuntimeColor; }
const hsColorRGBA& GetAmbientColor() const { return *fAmbientColor; }
const hsColorRGBA& GetSpecularColor() const { return *fSpecularColor; }
hsScalar GetOpacity() const { return *fOpacity; }
plBitmap* GetTexture() const { return *fTexture; }
// (Currently) unanimatables
UInt32 GetUVWSrc() const { return *fUVWSrc; }
hsScalar GetLODBias() const { return *fLODBias; }
hsScalar GetSpecularPower() const { return *fSpecularPower; }
const hsGMatState& GetState() const { return *fState; }
UInt32 GetBlendFlags() const { return fState->fBlendFlags; }
UInt32 GetClampFlags() const { return fState->fClampFlags; }
UInt32 GetShadeFlags() const { return fState->fShadeFlags; }
UInt32 GetZFlags() const { return fState->fZFlags; }
UInt32 GetMiscFlags() const { return fState->fMiscFlags; }
plShader* GetVertexShader() const { return *fVertexShader; }
plShader* GetPixelShader() const { return *fPixelShader; }
const hsMatrix44& GetBumpEnvMatrix() const { return *fBumpEnvXfm; }
// ClaimChannels will tell every other layer on this stack (besides this) to
// pass through the value, giving this layer the final say on it's value
void ClaimChannels(UInt32 chans);
// Eval may be called multiple times per frame, or even multiple times per render (for multiple
// renders per frame). The burden of deciding whether any update is necessary falls to the
// derived interface, but here's some info to go on.
// secs - world time. Time dependent effects (like time of day) look mostly at this.
// frame - incremented each time the camera moves. View dependent effects look at this.
// ignore - fields marked ignore will be overwritten (not modified) by an downstream layer, so don't bother computing.
// return value of fUnderLay->Eval() - bits are true for fields that an interface earlier in the chain dirtied. A field
// flagged dirty that you modify (as opposed to overwrite) should be updated regardless of secs and frame.
//
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
// Attach gives you a chance to decide whether you want to pass through fields from prev (by copying
// the pointers which you then sooner put long pins through your own eyes than modify). Alloc
// your own fields before Attach, and you can play with them at will. Base class will pass through
// (via pointer copy) all nil fields. Detach nils out any fields that are just pass through, and
// unthreads the requested layer from the stack, returning new top-of-stack.
//
// Given two stacks A->B and C->D, A->Attach(C) makes A->B->C->D
virtual plLayerInterface* Attach(plLayerInterface* prev);
// Given stack A->B->C->D, A->Detach(C) gives two stacks, A->B and C->D (returned value is A)
// If A == C (A->B->C && A->Remove(A)), it returns nil, since the it's removed A from the stack,
// so the two stacks are now nil and A->B->C
virtual plLayerInterface* Detach(plLayerInterface* nuke);
// Given stack A->B->C->D, A->Remove(C) gives two stacks, A->B->D and C. It returns the stack with C removed.
// If A==C (A->B->C && A->Remove(A)), it returns B->C.
virtual plLayerInterface* Remove(plLayerInterface* nuke);
plLayerInterface* GetAttached();
void AttachViaNotify(plLayerInterface *prev); // Export only
hsBool OwnChannel(UInt32 which) const { return 0 != (fOwnedChannels & which); }
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
virtual hsBool MsgReceive(plMessage* msg);
};
#endif // plLayerInterface_inc

View File

@ -0,0 +1,184 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "plLayerMultiply.h"
plLayerMultiply::plLayerMultiply() : fDirtyChannels(0), fSrcOpacity(1.f)
{
fSrcPreshadeColor.Set(1.f, 1.f, 1.f, 1.f);
fSrcRuntimeColor.Set(1.f, 1.f, 1.f, 1.f);
fSrcAmbientColor.Set(1.f, 1.f, 1.f, 1.f);
fSrcTransform.Reset();
}
plLayerMultiply::~plLayerMultiply()
{
}
void plLayerMultiply::Read(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Read(s, mgr);
fOwnedChannels = s->ReadSwap32();
if (fOwnedChannels & kOpacity)
{
fOpacity = TRACKED_NEW hsScalar;
*fOpacity = fSrcOpacity = s->ReadSwapScalar();
fDirtyChannels |= kOpacity;
}
if (fOwnedChannels & kPreshadeColor)
{
fPreshadeColor = TRACKED_NEW hsColorRGBA;
fSrcPreshadeColor.Read(s);
*fPreshadeColor = fSrcPreshadeColor;
fDirtyChannels |= kPreshadeColor;
}
if (fOwnedChannels & kRuntimeColor)
{
fRuntimeColor = TRACKED_NEW hsColorRGBA;
fSrcRuntimeColor.Read(s);
*fRuntimeColor = fSrcRuntimeColor;
fDirtyChannels |= kRuntimeColor;
}
if (fOwnedChannels & kAmbientColor)
{
fAmbientColor = TRACKED_NEW hsColorRGBA;
fSrcAmbientColor.Read(s);
*fAmbientColor = fSrcAmbientColor;
fDirtyChannels |= kAmbientColor;
}
if (fOwnedChannels & kTransform)
{
fTransform = TRACKED_NEW hsMatrix44;
fSrcTransform.Read(s);
*fTransform = fSrcTransform;
fDirtyChannels |= kTransform;
}
}
void plLayerMultiply::Write(hsStream* s, hsResMgr* mgr)
{
plLayerInterface::Write(s, mgr);
s->WriteSwap32(fOwnedChannels);
if (fOwnedChannels & kOpacity)
s->WriteSwapScalar(fSrcOpacity);
if (fOwnedChannels & kPreshadeColor)
fSrcPreshadeColor.Write(s);
if (fOwnedChannels & kRuntimeColor)
fSrcRuntimeColor.Write(s);
if (fOwnedChannels & kAmbientColor)
fSrcAmbientColor.Write(s);
if (fOwnedChannels & kTransform)
fSrcTransform.Write(s);
}
plLayerInterface* plLayerMultiply::Attach(plLayerInterface* prev)
{
return plLayerInterface::Attach(prev);
}
UInt32 plLayerMultiply::Eval(double wSecs, UInt32 frame, UInt32 ignore)
{
UInt32 dirtyChannels = fDirtyChannels | plLayerInterface::Eval(wSecs, frame, ignore);
UInt32 evalChannels = dirtyChannels & fOwnedChannels;
if (evalChannels & kPreshadeColor)
*fPreshadeColor = fSrcPreshadeColor * fUnderLay->GetPreshadeColor();
if (evalChannels & kRuntimeColor)
*fRuntimeColor = fSrcRuntimeColor * fUnderLay->GetRuntimeColor();
if (evalChannels & kAmbientColor)
*fAmbientColor = fSrcAmbientColor * fUnderLay->GetAmbientColor();
if (evalChannels & kOpacity)
*fOpacity = fSrcOpacity * fUnderLay->GetOpacity();
if (evalChannels & kTransform)
*fTransform = fSrcTransform * fUnderLay->GetTransform();
fDirtyChannels = 0;
return dirtyChannels;
}
hsBool plLayerMultiply::MsgReceive(plMessage* msg)
{
return plLayerMultiply::MsgReceive(msg);
}
void plLayerMultiply::SetPreshadeColor(const hsColorRGBA& col)
{
fSrcPreshadeColor = col;
fDirtyChannels |= kPreshadeColor;
}
void plLayerMultiply::SetRuntimeColor(const hsColorRGBA& col)
{
fSrcRuntimeColor = col;
fDirtyChannels |= kRuntimeColor;
}
void plLayerMultiply::SetAmbientColor(const hsColorRGBA& col)
{
fSrcAmbientColor = col;
fDirtyChannels |= kAmbientColor;
}
void plLayerMultiply::SetOpacity(hsScalar a)
{
fSrcOpacity = a;
fDirtyChannels |= kOpacity;
}
void plLayerMultiply::SetTransform(const hsMatrix44& xfm)
{
fSrcTransform = xfm;
fDirtyChannels |= kTransform;
}

View File

@ -0,0 +1,80 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef PL_LAYER_ANIMATION_INC
#define PL_LAYER_ANIMATION_INC
#include "plLayerInterface.h"
#include "hsMatrix44.h"
// Instead of overwriting owned channels, this layer type will multiply
// its source channel data to the underlayer
class plLayerMultiply : public plLayerInterface
{
public:
plLayerMultiply();
virtual ~plLayerMultiply();
CLASSNAME_REGISTER( plLayerMultiply );
GETINTERFACE_ANY( plLayerMultiply, plLayerInterface );
virtual plLayerInterface* Attach(plLayerInterface* prev);
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
virtual hsBool MsgReceive(plMessage* msg);
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
void SetPreshadeColor(const hsColorRGBA& col);
void SetRuntimeColor(const hsColorRGBA& col);
void SetAmbientColor(const hsColorRGBA& col);
void SetOpacity(hsScalar a);
void SetTransform(const hsMatrix44& xfm);
protected:
UInt32 fDirtyChannels;
hsColorRGBA fSrcPreshadeColor;
hsColorRGBA fSrcRuntimeColor;
hsColorRGBA fSrcAmbientColor;
hsScalar fSrcOpacity;
hsMatrix44 fSrcTransform;
};
#endif // PL_LAYER_ANIMATION_INC

View File

@ -0,0 +1,95 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayerOr.h"
plLayerOr::plLayerOr()
{
fState = TRACKED_NEW hsGMatState;
fState->Reset();
fOwnedChannels = kState;
}
plLayerOr::~plLayerOr()
{
}
void plLayerOr::SetState( const hsGMatState& state )
{
SetBlendFlags( state.fBlendFlags );
SetClampFlags( state.fClampFlags );
SetShadeFlags( state.fShadeFlags );
SetZFlags( state.fZFlags );
SetMiscFlags( state.fMiscFlags );
}
plLayerInterface *plLayerOr::Attach( plLayerInterface* prev )
{
fDirty = true;
return plLayerInterface::Attach( prev );
}
UInt32 plLayerOr::Eval(double secs, UInt32 frame, UInt32 ignore)
{
UInt32 ret = plLayerInterface::Eval(secs, frame, ignore);
if( fUnderLay )
{
if( fDirty || (ret & kState) )
{
*fState = fUnderLay->GetState();
if( fOringState.fBlendFlags & hsGMatState::kBlendMask )
fState->fBlendFlags &= ~hsGMatState::kBlendMask;
fState->fBlendFlags |= fOringState.fBlendFlags;
fState->fClampFlags = fUnderLay->GetClampFlags() | fOringState.fClampFlags;
fState->fShadeFlags = fUnderLay->GetShadeFlags() | fOringState.fShadeFlags;
fState->fZFlags = fUnderLay->GetZFlags() | fOringState.fZFlags;
fState->fMiscFlags = fUnderLay->GetMiscFlags() | fOringState.fMiscFlags;
fDirty = false;
}
}
return ret;
}

View File

@ -0,0 +1,74 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef _plLayerOr_h
#define _plLayerOr_h
#include "plLayerInterface.h"
#include "hsGMatState.h"
class plLayerOr : public plLayerInterface
{
protected:
hsGMatState fOringState;
hsBool fDirty;
public:
plLayerOr();
virtual ~plLayerOr();
CLASSNAME_REGISTER( plLayerOr );
GETINTERFACE_ANY( plLayerOr, plLayerInterface );
void SetBlendFlags( UInt32 f ) { fOringState.fBlendFlags = f; }
void SetClampFlags( UInt32 f ) { fOringState.fClampFlags = f; }
void SetShadeFlags( UInt32 f ) { fOringState.fShadeFlags = f; }
void SetZFlags( UInt32 f ) { fOringState.fZFlags = f; }
void SetMiscFlags( UInt32 f ) { fOringState.fMiscFlags = f; }
void SetState( const hsGMatState& state );
virtual plLayerInterface* Attach(plLayerInterface* prev);
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
};
#endif _plLayerOr_h

View File

@ -0,0 +1,160 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayerShadowBase.h"
///////////////////////////////////////////////////////////////////////////
plLayerLightBase::plLayerLightBase()
: fDirty(true)
{
fOwnedChannels = kState
| kAmbientColor
| kPreshadeColor;
fState = TRACKED_NEW hsGMatState;
fState->Reset();
fAmbientColor = TRACKED_NEW hsColorRGBA;
fAmbientColor->Set(0,0,0,1.f);
fPreshadeColor = TRACKED_NEW hsColorRGBA;
fPreshadeColor->Set(0,0,0,1.f);
}
plLayerLightBase::~plLayerLightBase()
{
}
plLayerInterface* plLayerLightBase::Attach(plLayerInterface* prev)
{
fDirty = true;
return plLayerInterface::Attach(prev);
}
UInt32 plLayerLightBase::Eval(double secs, UInt32 frame, UInt32 ignore)
{
UInt32 ret = plLayerInterface::Eval(secs, frame, ignore);
if( fUnderLay )
{
if( fDirty || (ret & kState) )
{
*fState = fUnderLay->GetState();
UInt32 blend = fState->fBlendFlags;
fState->fBlendFlags &= ~hsGMatState::kBlendMask;
switch( blend )
{
case hsGMatState::kBlendAlpha:
fState->fBlendFlags |= hsGMatState::kBlendAddColorTimesAlpha;
break;
default:
fState->fBlendFlags |= hsGMatState::kBlendAdd;
break;
}
fState->fZFlags |= hsGMatState::kZNoZWrite;
fState->fShadeFlags |= hsGMatState::kShadeIgnoreVtxIllum;
ret |= kState | kAmbientColor;
fDirty = false;
}
}
return ret;
}
///////////////////////////////////////////////////////////////////////////
plLayerShadowBase::plLayerShadowBase()
: fDirty(true)
{
fOwnedChannels = kState
| kAmbientColor
| kPreshadeColor;
fState = TRACKED_NEW hsGMatState;
fState->Reset();
fAmbientColor = TRACKED_NEW hsColorRGBA;
fAmbientColor->Set(0,0,0,1.f);
fPreshadeColor = TRACKED_NEW hsColorRGBA;
fPreshadeColor->Set(0,0,0,1.f);
}
plLayerShadowBase::~plLayerShadowBase()
{
}
plLayerInterface* plLayerShadowBase::Attach(plLayerInterface* prev)
{
fDirty = true;
return plLayerInterface::Attach(prev);
}
UInt32 plLayerShadowBase::Eval(double secs, UInt32 frame, UInt32 ignore)
{
UInt32 ret = plLayerInterface::Eval(secs, frame, ignore);
if( fUnderLay )
{
if( fDirty || (ret & kState) )
{
*fState = fUnderLay->GetState();
fState->fBlendFlags &= ~hsGMatState::kBlendMask;
//WHITE
fState->fBlendFlags |= hsGMatState::kBlendAlpha;
fState->fZFlags |= hsGMatState::kZNoZWrite;
fState->fShadeFlags |= hsGMatState::kShadeIgnoreVtxIllum;
ret |= kState | kAmbientColor | kPreshadeColor;
fDirty = false;
}
}
return ret;
}

View File

@ -0,0 +1,90 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerShadowBase_inc
#define plLayerShadowBase_inc
#include "plLayerInterface.h"
#include "hsGMatState.h"
class plLayerLightBase : public plLayerInterface
{
protected:
hsBool fDirty;
public:
plLayerLightBase();
virtual ~plLayerLightBase();
CLASSNAME_REGISTER( plLayerLightBase );
GETINTERFACE_ANY( plLayerLightBase, plLayerInterface );
virtual plLayerInterface* Attach(plLayerInterface* prev);
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
};
class plLayerShadowBase : public plLayerInterface
{
protected:
hsBool fDirty;
public:
plLayerShadowBase();
virtual ~plLayerShadowBase();
CLASSNAME_REGISTER( plLayerShadowBase );
GETINTERFACE_ANY( plLayerShadowBase, plLayerInterface );
virtual plLayerInterface* Attach(plLayerInterface* prev);
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 ignore);
};
#endif // plLayerShadowBase_inc

View File

@ -0,0 +1,58 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plLayerWrapper.h"
plLayerWrapper::plLayerWrapper()
{
}
void plLayerWrapper::Init(hsGLayer* lay)
{
fState = &lay->fState;
fUVWSrc = &lay->fUVWSrc;
fTransform = lay->fXform;
fColor = &lay->fColor;
fAmbientColor = &lay->fAmbientColor;
fTexture = lay->fTexture;
}

View File

@ -0,0 +1,71 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plLayerWrapper_inc
#define plLayerWrapper_inc
#include "plLayerInterface.h"
class hsGLayer;
class plLayerWrapper : public plLayerInterface
{
protected:
public:
plLayerWrapper();
CLASSNAME_REGISTER( plLayerWrapper );
GETINTERFACE_ANY( plLayerWrapper, plLayerInterface );
virtual void Init(const plLayerInterface* prev) {} // Init(layer) currently handles all this
void Init(hsGLayer* lay);
virtual UInt32 Eval(double secs, UInt32 frame, UInt32 dirty, plLayerInterface* prev)
{
return dirty;
}
virtual hsBool MsgReceive(plMessage* msg) { return plLayerInterface::MsgReceive(msg); }
};
#endif // plLayerWrapper_inc

View File

@ -0,0 +1,337 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plShader.h"
#include "plShaderTable.h"
#include "hsStream.h"
#include "hsMatrix44.h"
#include "hsColorRGBA.h"
#include "../plPipeline/hsGDeviceRef.h"
// Little shader const helper
void plShaderConst::Read(hsStream* s)
{
fX = s->ReadSwapScalar();
fY = s->ReadSwapScalar();
fZ = s->ReadSwapScalar();
fW = s->ReadSwapScalar();
}
void plShaderConst::Write(hsStream* s)
{
s->WriteSwapScalar(fX);
s->WriteSwapScalar(fY);
s->WriteSwapScalar(fZ);
s->WriteSwapScalar(fW);
}
//////////////////////////////////////////////////////////////////////////////////
// Real Shader follows
//////////////////////////////////////////////////////////////////////////////////
plShader::plShader()
: fFlags(0),
fDeviceRef(nil),
fInput(0),
fOutput(0),
fDecl(0)
{
}
plShader::~plShader()
{
delete fDeviceRef;
}
void plShader::SetDeviceRef(hsGDeviceRef* ref) const
{
hsRefCnt_SafeAssign(fDeviceRef, ref);
}
void plShader::SetMatrix(int i, const plFloat44& xfm)
{
// Stuff in the transpose
SetVector(i+0, xfm.m[0][0], xfm.m[1][0], xfm.m[2][0], xfm.m[3][0]);
SetVector(i+1, xfm.m[0][1], xfm.m[1][1], xfm.m[2][1], xfm.m[3][1]);
SetVector(i+2, xfm.m[0][2], xfm.m[1][2], xfm.m[2][2], xfm.m[3][2]);
SetVector(i+3, xfm.m[0][3], xfm.m[1][3], xfm.m[2][3], xfm.m[3][3]);
}
void plShader::SetMatrix3(int i, const plFloat44& xfm)
{
// Stuff in the transpose
SetVector(i+0, xfm.m[0][0], xfm.m[1][0], xfm.m[2][0], xfm.m[3][0]);
SetVector(i+1, xfm.m[0][1], xfm.m[1][1], xfm.m[2][1], xfm.m[3][1]);
SetVector(i+2, xfm.m[0][2], xfm.m[1][2], xfm.m[2][2], xfm.m[3][2]);
}
void plShader::SetMatrix44(int i, const hsMatrix44& xfm)
{
// hsMatrix44 is already transpose of the rest of the world
SetVector(i+0, xfm.fMap[0][0], xfm.fMap[0][1], xfm.fMap[0][2], xfm.fMap[0][3]);
SetVector(i+1, xfm.fMap[1][0], xfm.fMap[1][1], xfm.fMap[1][2], xfm.fMap[1][3]);
SetVector(i+2, xfm.fMap[2][0], xfm.fMap[2][1], xfm.fMap[2][2], xfm.fMap[2][3]);
SetVector(i+3, xfm.fMap[3][0], xfm.fMap[3][1], xfm.fMap[3][2], xfm.fMap[3][3]);
}
void plShader::SetMatrix34(int i, const hsMatrix44& xfm)
{
// hsMatrix44 is already transpose of the rest of the world
SetVector(i+0, xfm.fMap[0][0], xfm.fMap[0][1], xfm.fMap[0][2], xfm.fMap[0][3]);
SetVector(i+1, xfm.fMap[1][0], xfm.fMap[1][1], xfm.fMap[1][2], xfm.fMap[1][3]);
SetVector(i+2, xfm.fMap[2][0], xfm.fMap[2][1], xfm.fMap[2][2], xfm.fMap[2][3]);
}
void plShader::SetMatrix24(int i, const hsMatrix44& xfm)
{
// hsMatrix44 is already transpose of the rest of the world
SetVector(i+0, xfm.fMap[0][0], xfm.fMap[0][1], xfm.fMap[0][2], xfm.fMap[0][3]);
SetVector(i+1, xfm.fMap[1][0], xfm.fMap[1][1], xfm.fMap[1][2], xfm.fMap[1][3]);
}
void plShader::SetColor(int i, const hsColorRGBA& col)
{
SetVector(i, col.r, col.g, col.b, col.a);
}
void plShader::SetVector(int i, const hsScalarTriple& vec)
{
/* Doesn't touch .fW */
fConsts[i].fX = vec.fX;
fConsts[i].fY = vec.fY;
fConsts[i].fZ = vec.fZ;
}
void plShader::SetVector(int i, hsScalar x, hsScalar y, hsScalar z, hsScalar w)
{
fConsts[i].x = x;
fConsts[i].y = y;
fConsts[i].z = z;
fConsts[i].w = w;
}
void plShader::SetFloat(int i, int chan, float v)
{
fConsts[i].fArray[chan] = v;
}
void plShader::SetFloat4(int i, const float* const f)
{
fConsts[i].fX = f[0];
fConsts[i].fY = f[1];
fConsts[i].fZ = f[2];
fConsts[i].fW = f[3];
}
plFloat44 plShader::GetMatrix(int i) const
{
// untranspose
plFloat44 xfm;
int j;
for( j = 0; j < 4; j++ )
{
int k;
for( k = 0; k < 4; k++ )
xfm.m[j][k] = fConsts[i+k].fArray[j];
}
return xfm;
}
plFloat44 plShader::GetMatrix3(int i) const
{
// untranspose
plFloat44 xfm;
int j;
for( j = 0; j < 4; j++ )
{
int k;
for( k = 0; k < 3; k++ )
xfm.m[j][k] = fConsts[i+k].fArray[j];
}
xfm.m[0][3] = xfm.m[1][3] = xfm.m[2][3] = 0;
xfm.m[3][3] = 1.f;
return xfm;
}
hsMatrix44 plShader::GetMatrix44(int i) const
{
hsMatrix44 xfm;
xfm.NotIdentity();
int j;
for( j = 0; j < 4; j++ )
{
int k;
for( k = 0; k < 4; k++ )
xfm.fMap[j][k] = fConsts[i+j][k];
}
return xfm;
}
hsMatrix44 plShader::GetMatrix34(int i) const
{
hsMatrix44 xfm;
xfm.NotIdentity();
int j;
for( j = 0; j < 3; j++ )
{
int k;
for( k = 0; k < 4; k++ )
xfm.fMap[j][k] = fConsts[i+j][k];
}
xfm.fMap[3][0] = xfm.fMap[3][1] = xfm.fMap[3][2] = 0;
xfm.fMap[3][3] = 1.f;
return xfm;
}
hsMatrix44 plShader::GetMatrix24(int i) const
{
hsMatrix44 xfm;
xfm.NotIdentity();
int j;
for( j = 0; j < 2; j++ )
{
int k;
for( k = 0; k < 4; k++ )
xfm.fMap[j][k] = fConsts[i+j][k];
}
xfm.fMap[2][0] = xfm.fMap[2][1] = xfm.fMap[2][2] = xfm.fMap[2][3] = 0;
xfm.fMap[3][0] = xfm.fMap[3][1] = xfm.fMap[3][2] = 0;
xfm.fMap[3][3] = 1.f;
return xfm;
}
hsColorRGBA plShader::GetColor(int i) const
{
return hsColorRGBA().Set(fConsts[i].r, fConsts[i].g, fConsts[i].b, fConsts[i].a);
}
hsPoint3 plShader::GetPosition(int i) const
{
return hsPoint3(fConsts[i].fX, fConsts[i].fY, fConsts[i].fZ);
}
hsVector3 plShader::GetVector(int i) const
{
return hsVector3(fConsts[i].fX, fConsts[i].fY, fConsts[i].fZ);
}
void plShader::GetVector(int i, hsScalar& x, hsScalar& y, hsScalar& z, hsScalar& w) const
{
x = fConsts[i].x;
y = fConsts[i].y;
z = fConsts[i].z;
w = fConsts[i].w;
}
hsScalar plShader::GetFloat(int i, int chan) const
{
return fConsts[i].fArray[chan];
}
const float* const plShader::GetFloat4(int i) const
{
return fConsts[i].fArray;
}
void plShader::Read(hsStream* s, hsResMgr* mgr)
{
fFlags = 0;
hsKeyedObject::Read(s, mgr);
UInt32 n = s->ReadSwap32();
fConsts.SetCount(n);
int i;
for( i = 0; i < n; i++ )
fConsts[i].Read(s);
plShaderID::ID id = plShaderID::ID(s->ReadSwap32());
SetDecl(plShaderTable::Decl(id));
fInput = s->ReadByte();
fOutput = s->ReadByte();
}
void plShader::Write(hsStream* s, hsResMgr* mgr)
{
hsKeyedObject::Write(s, mgr);
s->WriteSwap32(fConsts.GetCount());
int i;
for( i = 0; i < fConsts.GetCount(); i++ )
fConsts[i].Write(s);
s->WriteSwap32(fDecl->GetID());
s->WriteByte(fInput);
s->WriteByte(fOutput);
}
void plShader::SetDecl(const plShaderDecl* decl)
{
fDecl = decl;
}
void plShader::SetDecl(plShaderID::ID id)
{
SetDecl(plShaderTable::Decl(id));
}
void plShader::SetNumPipeConsts(int n)
{
int nOld = fPipeConsts.GetCount();
if( n > nOld )
{
// This will copy forward any existing entries.
fPipeConsts.Expand(n);
}
fPipeConsts.SetCount(n);
}

View File

@ -0,0 +1,282 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plShader_inc
#define plShader_inc
#include "../pnKeyedObject/hsKeyedObject.h"
#include "hsTemplates.h"
#include "hsGeometry3.h"
#include "hsMatrix44.h"
#include "plShaderTable.h"
class hsStream;
class hsResMgr;
class hsMatrix;
struct hsColorRGBA;
class hsGDeviceRef;
class plFloat4
{
public:
float f[4];
};
class plFloat44
{
public:
float m[4][4];
};
class plFloat34
{
public:
float m[3][4];
};
class plShaderConst
{
public:
union
{
struct {
float r;
float g;
float b;
float a;
};
struct {
float x;
float y;
float z;
float w;
};
struct {
float fX;
float fY;
float fZ;
float fW;
};
float fArray[4];
};
float& operator[](int i) { return fArray[i]; }
void Read(hsStream* s);
void Write(hsStream* s);
};
class plShaderDecl;
class plPipeConst
{
public:
enum Type
{
kLocalToNDC, // 4x4
kCameraToNDC, // 4x4
kWorldToNDC, // 4x4
kLocalToWorld, // 3x4
kWorldToLocal, // 3x4
kWorldToCamera, // 3x4
kCameraToWorld, // 3x4
kLocalToCamera, // 3x4
kCameraToLocal, // 3x4
kCamPosWorld, // 1x4
kCamPosLocal, // 1x4
kObjPosWorld, // 1x4
kTex3x4_0, // 3x4, stage 0
kTex3x4_1, // 3x4, stage 1
kTex3x4_2, // 3x4, stage 2
kTex3x4_3, // 3x4, stage 3
kTex3x4_4, // 3x4, stage 4
kTex3x4_5, // 3x4, stage 5
kTex3x4_6, // 3x4, stage 6
kTex3x4_7, // 3x4, stage 7
kTex2x4_0, // 2x4, stage 0
kTex2x4_1, // 2x4, stage 1
kTex2x4_2, // 2x4, stage 2
kTex2x4_3, // 2x4, stage 3
kTex2x4_4, // 2x4, stage 4
kTex2x4_5, // 2x4, stage 5
kTex2x4_6, // 2x4, stage 6
kTex2x4_7, // 2x4, stage 7
kTex1x4_0, // 1x4, stage 0
kTex1x4_1, // 1x4, stage 1
kTex1x4_2, // 1x4, stage 2
kTex1x4_3, // 1x4, stage 3
kTex1x4_4, // 1x4, stage 4
kTex1x4_5, // 1x4, stage 5
kTex1x4_6, // 1x4, stage 6
kTex1x4_7, // 1x4, stage 7
kDirLight1, // 2x4, dir, then color
kDirLight2, // 4x4, kDirLight1 x 2
kDirLight3, // 6x4, kDirLight1 x 3
kDirLight4, // 8x4, kDirLight1 x 4
kPointLight1, // 3x4, pos, dir, distAtten (spotAtten.xy dropped on end of pos.w/dir.w)
kPointLight2, // 6x4, kPointLight1 x 2
kPointLight3, // 9x4, kPointLight1 x 3
kPointLight4, // 12x4, kPointLight1 x4
kLayAmbient, // 4x4
kLayRuntime, // 4x4 (r,g,b,a)
kLaySpecular, // 4x4 (but alpha is ignored).
kFogSet, // 1x4 = (-FogMax, 1.f/(FogMin - FogMax), density, 1)
kColorFilter, // 1x4 color filter currently applied to entire scene.
kMaxType
};
public:
plPipeConst() {}
plPipeConst(Type t, UInt16 r) : fType(t), fReg(r) {}
Type fType;
UInt16 fReg;
};
typedef plPipeConst::Type plPipeConstType;
class plShader : public hsKeyedObject
{
public:
enum {
kValidated = 0x1,
kInvalid = 0x2,
kIsPixel = 0x4,
kShaderNotFound = 0x8,
kShaderError = 0x10,
kShaderUnsupported = 0x20
};
protected:
mutable UInt32 fFlags;
hsTArray<plShaderConst> fConsts;
mutable hsGDeviceRef* fDeviceRef;
const plShaderDecl* fDecl;
UInt8 fInput;
UInt8 fOutput;
hsTArray<plPipeConst> fPipeConsts;
public:
plShader();
virtual ~plShader();
CLASSNAME_REGISTER( plShader );
GETINTERFACE_ANY( plShader, hsKeyedObject );
// Read and write
virtual void Read(hsStream* s, hsResMgr* mgr);
virtual void Write(hsStream* s, hsResMgr* mgr);
void SetNumConsts(int cnt) { fConsts.SetCount(cnt); }
UInt32 GetNumConsts() const { return fConsts.GetCount(); }
plShaderConst& GetConst(int i) { return fConsts[i]; }
const plShaderConst& GetConst(int i) const { return fConsts[i]; }
void SetConst(int i, const plShaderConst& c) { fConsts[i] = c; }
plFloat44 GetMatrix(int i) const; // Will untranspose
plFloat44 GetMatrix3(int i) const; // Will untranspose
hsMatrix44 GetMatrix44(int i) const;
hsMatrix44 GetMatrix34(int i) const;
hsMatrix44 GetMatrix24(int i) const;
hsColorRGBA GetColor(int i) const;
hsPoint3 GetPosition(int i) const;
hsVector3 GetVector(int i) const;
void GetVector(int i, hsScalar& x, hsScalar& y, hsScalar& z, hsScalar& w) const;
hsScalar GetFloat(int i, int chan) const;
const float* const GetFloat4(int i) const;
void SetMatrix(int i, const plFloat44& xfm); // Will transpose
void SetMatrix3(int i, const plFloat44& xfm); // Will transpose
void SetMatrix44(int i, const hsMatrix44& xfm);
void SetMatrix34(int i, const hsMatrix44& xfm);
void SetMatrix24(int i, const hsMatrix44& xfm);
void SetColor(int i, const hsColorRGBA& col);
void SetVector(int i, const hsScalarTriple& vec); /* Doesn't touch .fW */
void SetVectorW(int i, const hsScalarTriple& vec, hsScalar w=1.f) { SetVector(i, vec.fX, vec.fY, vec.fZ, w); }
void SetVector(int i, hsScalar x, hsScalar y, hsScalar z, hsScalar w);
void SetFloat(int i, int chan, float v);
void SetFloat4(int i, const float* const f);
const plShaderDecl* GetDecl() const { return fDecl; }
void SetDecl(const plShaderDecl* p); // will reference (pointer copy)
void SetDecl(plShaderID::ID id);
hsBool IsValid() const { return !(fFlags & kInvalid); }
void Invalidate() const { fFlags |= kInvalid; }
hsBool IsPixelShader() const { return 0 != (fFlags & kIsPixel); }
hsBool IsVertexShader() const { return !IsPixelShader(); }
void SetIsPixelShader(hsBool on) { if(on)fFlags |= kIsPixel; else fFlags &= ~kIsPixel; }
// These are only for use by the pipeline.
hsGDeviceRef* GetDeviceRef() const { return fDeviceRef; }
void SetDeviceRef(hsGDeviceRef* ref) const;
void* GetConstBasePtr() const { return fConsts.GetCount() ? &fConsts[0] : nil; }
void CopyConsts(const plShader* src) { fConsts = src->fConsts; }
void SetInputFormat(UInt8 format) { fInput = format; }
void SetOutputFormat(UInt8 format) { fOutput = format; }
UInt8 GetInputFormat() const { return fInput; }
UInt8 GetOutputFormat() const { return fOutput; }
UInt32 GetNumPipeConsts() const { return fPipeConsts.GetCount(); }
const plPipeConst& GetPipeConst(int i) const { return fPipeConsts[i]; }
plPipeConst::Type GetPipeConstType(int i) const { return fPipeConsts[i].fType; }
UInt16 GetPipeConstReg(int i) const { return fPipeConsts[i].fReg; }
void SetNumPipeConsts(int n);
void SetPipeConst(int i, const plPipeConst& c) { fPipeConsts[i] = c; }
void SetPipeConst(int i, plPipeConstType t, UInt16 r) { fPipeConsts[i].fType = t; fPipeConsts[i].fReg = r; }
void SetPipeConstType(int i, plPipeConstType t) { fPipeConsts[i].fType = t; }
void SetPipeConstReg(int i, UInt16 r) { fPipeConsts[i].fReg = r; }
};
#endif // plShader_inc

View File

@ -0,0 +1,119 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#include "hsTypes.h"
#include "plShaderTable.h"
#include "plShader.h"
using namespace plShaderID;
///////////////////////////////////////////////////////////////////////
// Includes for compiled shaders
///////////////////////////////////////////////////////////////////////
#include "vs_WaveFixedFin6.h"
#include "ps_WaveFixed.h"
#include "vs_CompCosines.h"
#include "ps_CompCosines.h"
#include "vs_ShoreLeave6.h"
#include "ps_ShoreLeave6.h"
#include "vs_WaveRip.h"
#include "ps_WaveRip.h"
#include "vs_WaveDec1Lay.h"
#include "vs_WaveDec2Lay11.h"
#include "vs_WaveDec2Lay12.h"
#include "vs_WaveDecEnv.h"
#include "ps_CbaseAbase.h"
#include "ps_CalphaAbase.h"
#include "ps_CalphaAMult.h"
#include "ps_CalphaAadd.h"
#include "ps_CaddAbase.h"
#include "ps_CaddAMult.h"
#include "ps_CaddAAdd.h"
#include "ps_CmultAbase.h"
#include "ps_CmultAMult.h"
#include "ps_CmultAAdd.h"
#include "ps_WaveDecEnv.h"
#include "vs_WaveGraph2.h"
#include "ps_WaveGraph.h"
#include "vs_WaveGridFin.h"
#include "ps_WaveGrid.h"
#include "vs_BiasNormals.h"
#include "ps_BiasNormals.h"
#include "vs_ShoreLeave7.h"
#include "vs_WaveRip7.h"
#include "ps_MoreCosines.h"
#include "vs_WaveDec1Lay_7.h"
#include "vs_WaveDec2Lay11_7.h"
#include "vs_WaveDec2Lay12_7.h"
#include "vs_WaveDecEnv_7.h"
#include "vs_WaveFixedFin7.h"
#include "vs_GrassShader.h"
#include "ps_GrassShader.h"
plShaderTableInst::plShaderTableInst()
: fFlags(0)
{
}
plShaderTableInst::~plShaderTableInst()
{
}
void plShaderTableInst::Register(const plShaderDecl* decl)
{
hsAssert(decl->GetID() && (decl->GetID() < plShaderID::kNumShaders), "Unexpected registration");
fTable[decl->GetID()] = decl;
}
plShaderTableInst& plShaderTable::IMakeInstance()
{
static plShaderTableInst inst;
fInst = &inst;
return *fInst;
}
plShaderTableInst* plShaderTable::fInst;

View File

@ -0,0 +1,176 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plShaderTable_inc
#define plShaderTable_inc
#include "hsTemplates.h"
// When adding to the compiled table, make sure
// you add the include in plShaderTable.cpp, or you'll
// compile fine but have a nil shader (FFP) at runtime.
namespace plShaderID
{
enum ID
{
Unregistered = 0,
vs_WaveFixedFin6, //OBSOLETE
ps_WaveFixed,
vs_CompCosines,
ps_CompCosines, //OBSOLETE
vs_ShoreLeave6, //OBSOLETE
ps_ShoreLeave6,
vs_WaveRip, //OBSOLETE
ps_WaveRip,
vs_WaveDec1Lay, //OBSOLETE
vs_WaveDec2Lay11, //OBSOLETE
vs_WaveDec2Lay12, //OBSOLETE
vs_WaveDecEnv, //OBSOLETE
ps_CbaseAbase,
ps_CalphaAbase,
ps_CalphaAMult,
ps_CalphaAadd,
ps_CaddAbase,
ps_CaddAMult,
ps_CaddAAdd,
ps_CmultAbase,
ps_CmultAMult,
ps_CmultAAdd,
ps_WaveDecEnv,
vs_WaveGraph2,
ps_WaveGraph,
vs_WaveGridFin, //OBSOLETE
ps_WaveGrid, //OBSOLETE
vs_BiasNormals,
ps_BiasNormals,
vs_ShoreLeave7,
vs_WaveRip7,
ps_MoreCosines,
vs_WaveDec1Lay_7,
vs_WaveDec2Lay11_7,
vs_WaveDec2Lay12_7,
vs_WaveDecEnv_7,
vs_WaveFixedFin7,
vs_GrassShader,
ps_GrassShader,
kNumShaders
};
};
class plShaderDecl
{
protected:
const plShaderID::ID fID;
const UInt32 fByteLen;
const UInt8* const fCodes;
const char* const fFileName;
public:
plShaderDecl(const char* const fname, plShaderID::ID id = plShaderID::Unregistered, UInt32 byteLen = 0, const UInt8* const codes = 0L) : fID(id), fByteLen(byteLen), fCodes(codes), fFileName(fname) {}
// Data (fCodes) is never deleted, It points to memory compiled in.
plShaderID::ID GetID() const { return fID; }
UInt32 GetByteLen() const { return fByteLen; }
const UInt8* GetCodes() const { return fCodes; }
const char* const GetFileName() const { return fFileName; }
};
class plShaderTableInst
{
protected:
enum
{
kLoadFromFile = 0x1
};
UInt32 fFlags;
const plShaderDecl* fTable[plShaderID::kNumShaders];
plShaderTableInst();
hsBool LoadFromFile() const { return 0 != (fFlags & kLoadFromFile); }
void SetLoadFromFile(hsBool on) { if(on) fFlags |= kLoadFromFile; else fFlags &= ~kLoadFromFile; }
const plShaderDecl* Decl(plShaderID::ID id) const { return fTable[id]; }
void Register(const plShaderDecl* decl);
hsBool IsRegistered(plShaderID::ID id) const { return (id == 0) || ((id < plShaderID::kNumShaders) && fTable[id]); }
public:
virtual ~plShaderTableInst();
friend class plShaderTable;
};
class plShaderTable
{
protected:
static plShaderTableInst* fInst;
static plShaderTableInst& IMakeInstance();
static plShaderTableInst& Instance() { return fInst ? *fInst : IMakeInstance(); }
public:
static hsBool LoadFromFile() { return Instance().LoadFromFile(); }
static void SetLoadFromFile(hsBool on) { Instance().SetLoadFromFile(on); }
static const plShaderDecl* Decl(plShaderID::ID id) { return Instance().Decl(id); }
static void Register(const plShaderDecl* decl) { Instance().Register(decl); }
static hsBool IsRegistered(plShaderID::ID id) { return Instance().IsRegistered(id); }
};
class plShaderRegister
{
public:
plShaderRegister(const plShaderDecl* decl) { plShaderTable::Register(decl); }
};
#endif // plShaderTable_inc

View File

@ -0,0 +1,88 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
#ifndef plSurfaceCreatable_inc
#define plSurfaceCreatable_inc
#include "../pnFactory/plCreator.h"
#include "hsGMaterial.h"
REGISTER_CREATABLE( hsGMaterial );
#include "plLayerInterface.h"
REGISTER_NONCREATABLE( plLayerInterface );
#include "plLayer.h"
REGISTER_CREATABLE( plLayer );
#include "plLayerAnimation.h"
REGISTER_CREATABLE( plLayerAnimation );
REGISTER_CREATABLE( plLayerLinkAnimation );
REGISTER_NONCREATABLE( plLayerAnimationBase );
REGISTER_CREATABLE( plLayerSDLAnimation );
#include "plLayerDepth.h"
REGISTER_CREATABLE( plLayerDepth );
#include "plLayerOr.h"
REGISTER_CREATABLE( plLayerOr );
#include "plLayerShadowBase.h"
REGISTER_CREATABLE( plLayerShadowBase );
REGISTER_CREATABLE( plLayerLightBase );
#include "plShader.h"
REGISTER_CREATABLE( plShader );
#include "plGrassShaderMod.h"
REGISTER_CREATABLE( plGrassShaderMod );
#endif // plSurfaceCreatable_inc

View File

@ -0,0 +1,71 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_BiasNormalsByteLen = 76;
static const UInt8 ps_BiasNormalsCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb2,
0x1, 0x0, 0xe4, 0xb2,
0x2, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x1, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_BiasNormalsDecl("sha/ps_BiasNormals.inl", ps_BiasNormals, ps_BiasNormalsByteLen, ps_BiasNormalsCodes);
static const plShaderRegister ps_BiasNormalsRegister(&ps_BiasNormalsDecl);

View File

@ -0,0 +1,70 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CaddAAddByteLen = 72;
static const UInt8 ps_CaddAAddCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x2, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CaddAAddDecl("sha/ps_CaddAAdd.inl", ps_CaddAAdd, ps_CaddAAddByteLen, ps_CaddAAddCodes);
static const plShaderRegister ps_CaddAAddRegister(&ps_CaddAAddDecl);

View File

@ -0,0 +1,70 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CaddAMultByteLen = 72;
static const UInt8 ps_CaddAMultCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CaddAMultDecl("sha/ps_CaddAMult.inl", ps_CaddAMult, ps_CaddAMultByteLen, ps_CaddAMultCodes);
static const plShaderRegister ps_CaddAMultRegister(&ps_CaddAMultDecl);

View File

@ -0,0 +1,69 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CaddAbaseByteLen = 68;
static const UInt8 ps_CaddAbaseCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CaddAbaseDecl("sha/ps_CaddAbase.inl", ps_CaddAbase, ps_CaddAbaseByteLen, ps_CaddAbaseCodes);
static const plShaderRegister ps_CaddAbaseRegister(&ps_CaddAbaseDecl);

View File

@ -0,0 +1,71 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CalphaAMultByteLen = 76;
static const UInt8 ps_CalphaAMultCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x12, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x1, 0x0, 0xff, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CalphaAMultDecl("sha/ps_CalphaAMult.inl", ps_CalphaAMult, ps_CalphaAMultByteLen, ps_CalphaAMultCodes);
static const plShaderRegister ps_CalphaAMultRegister(&ps_CalphaAMultDecl);

View File

@ -0,0 +1,71 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CalphaAaddByteLen = 76;
static const UInt8 ps_CalphaAaddCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x12, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x1, 0x0, 0xff, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CalphaAaddDecl("sha/ps_CalphaAadd.inl", ps_CalphaAadd, ps_CalphaAaddByteLen, ps_CalphaAaddCodes);
static const plShaderRegister ps_CalphaAaddRegister(&ps_CalphaAaddDecl);

View File

@ -0,0 +1,70 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CalphaAbaseByteLen = 72;
static const UInt8 ps_CalphaAbaseCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x12, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x1, 0x0, 0xff, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CalphaAbaseDecl("sha/ps_CalphaAbase.inl", ps_CalphaAbase, ps_CalphaAbaseByteLen, ps_CalphaAbaseCodes);
static const plShaderRegister ps_CalphaAbaseRegister(&ps_CalphaAbaseDecl);

View File

@ -0,0 +1,60 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CbaseAbaseByteLen = 32;
static const UInt8 ps_CbaseAbaseCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CbaseAbaseDecl("sha/ps_CbaseAbase.inl", ps_CbaseAbase, ps_CbaseAbaseByteLen, ps_CbaseAbaseCodes);
static const plShaderRegister ps_CbaseAbaseRegister(&ps_CbaseAbaseDecl);

View File

@ -0,0 +1,70 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CmultAAddByteLen = 72;
static const UInt8 ps_CmultAAddCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x2, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CmultAAddDecl("sha/ps_CmultAAdd.inl", ps_CmultAAdd, ps_CmultAAddByteLen, ps_CmultAAddCodes);
static const plShaderRegister ps_CmultAAddRegister(&ps_CmultAAddDecl);

View File

@ -0,0 +1,70 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CmultAMultByteLen = 72;
static const UInt8 ps_CmultAMultCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CmultAMultDecl("sha/ps_CmultAMult.inl", ps_CmultAMult, ps_CmultAMultByteLen, ps_CmultAMultCodes);
static const plShaderRegister ps_CmultAMultRegister(&ps_CmultAMultDecl);

View File

@ -0,0 +1,69 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CmultAbaseByteLen = 68;
static const UInt8 ps_CmultAbaseCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CmultAbaseDecl("sha/ps_CmultAbase.inl", ps_CmultAbase, ps_CmultAbaseByteLen, ps_CmultAbaseCodes);
static const plShaderRegister ps_CmultAbaseRegister(&ps_CmultAbaseDecl);

View File

@ -0,0 +1,89 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_CompCosinesByteLen = 148;
static const UInt8 ps_CompCosinesCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb4,
0x0, 0x0, 0xe4, 0xa0,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x1, 0x0, 0xe4, 0xb4,
0x1, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x2, 0x0, 0xe4, 0xb4,
0x2, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x3, 0x0, 0xe4, 0xb4,
0x3, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_CompCosinesDecl("sha/ps_CompCosines.inl", ps_CompCosines, ps_CompCosinesByteLen, ps_CompCosinesCodes);
static const plShaderRegister ps_CompCosinesRegister(&ps_CompCosinesDecl);

View File

@ -0,0 +1,60 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_GrassShaderByteLen = 32;
static const UInt8 ps_GrassShaderCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_GrassShaderDecl("sha/ps_GrassShader.inl", ps_GrassShader, ps_GrassShaderByteLen, ps_GrassShaderCodes);
static const plShaderRegister ps_GrassShaderRegister(&ps_GrassShaderDecl);

View File

@ -0,0 +1,92 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_MoreCosinesByteLen = 160;
static const UInt8 ps_MoreCosinesCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb4,
0x0, 0x0, 0xe4, 0xa0,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x1, 0x0, 0xe4, 0xb4,
0x1, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x2, 0x0, 0xe4, 0xb4,
0x2, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x3, 0x0, 0xe4, 0xb4,
0x3, 0x0, 0xe4, 0xa0,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x4, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_MoreCosinesDecl("sha/ps_MoreCosines.inl", ps_MoreCosines, ps_MoreCosinesByteLen, ps_MoreCosinesCodes);
static const plShaderRegister ps_MoreCosinesRegister(&ps_MoreCosinesDecl);

View File

@ -0,0 +1,95 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_ShoreLeave6ByteLen = 172;
static const UInt8 ps_ShoreLeave6Codes[] = {
0x1, 0x1, 0xff, 0xff,
0x51, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xa0,
0x0, 0x0, 0x80, 0x3f,
0x0, 0x0, 0x80, 0x3f,
0x0, 0x0, 0x80, 0x3f,
0x0, 0x0, 0x80, 0x3f,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0x8, 0x80,
0x1, 0x0, 0xe4, 0xb0,
0x12, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x1, 0x0, 0xff, 0x80,
0x1, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x1, 0x0, 0xe4, 0xb6,
0x0, 0x0, 0xe4, 0xb6,
0x12, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x2, 0x0, 0xff, 0xb0,
0x2, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x2, 0x0, 0xe4, 0xb6,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0x86,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_ShoreLeave6Decl("sha/ps_ShoreLeave6.inl", ps_ShoreLeave6, ps_ShoreLeave6ByteLen, ps_ShoreLeave6Codes);
static const plShaderRegister ps_ShoreLeave6Register(&ps_ShoreLeave6Decl);

View File

@ -0,0 +1,73 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_WaveDecEnvByteLen = 84;
static const UInt8 ps_WaveDecEnvCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x49, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x49, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x4d, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x3, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0x5, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_WaveDecEnvDecl("sha/ps_WaveDecEnv.inl", ps_WaveDecEnv, ps_WaveDecEnvByteLen, ps_WaveDecEnvCodes);
static const plShaderRegister ps_WaveDecEnvRegister(&ps_WaveDecEnvDecl);

View File

@ -0,0 +1,79 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_WaveFixedByteLen = 108;
static const UInt8 ps_WaveFixedCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x51, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xa0,
0x0, 0x0, 0x80, 0x3f,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0,
0x0, 0x0, 0x80, 0x3f,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x49, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x49, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x4d, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x3, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0x1, 0x0, 0xe4, 0x90,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0x8, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_WaveFixedDecl("sha/ps_WaveFixed.inl", ps_WaveFixed, ps_WaveFixedByteLen, ps_WaveFixedCodes);
static const plShaderRegister ps_WaveFixedRegister(&ps_WaveFixedDecl);

View File

@ -0,0 +1,72 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_WaveGraphByteLen = 80;
static const UInt8 ps_WaveGraphCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x42, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0xb0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x2, 0x0, 0xe4, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_WaveGraphDecl("sha/ps_WaveGraph.inl", ps_WaveGraph, ps_WaveGraphByteLen, ps_WaveGraphCodes);
static const plShaderRegister ps_WaveGraphRegister(&ps_WaveGraphDecl);

View File

@ -0,0 +1,73 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_WaveGridByteLen = 84;
static const UInt8 ps_WaveGridCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x49, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x49, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x4d, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xb0,
0x0, 0x0, 0xe4, 0xb4,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0x7, 0x80,
0x3, 0x0, 0xe4, 0xb0,
0x1, 0x0, 0xe4, 0x90,
0x0, 0x0, 0xe4, 0x90,
0x1, 0x0, 0x0, 0x40,
0x0, 0x0, 0x8, 0x80,
0x1, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_WaveGridDecl("sha/ps_WaveGrid.inl", ps_WaveGrid, ps_WaveGridByteLen, ps_WaveGridCodes);
static const plShaderRegister ps_WaveGridRegister(&ps_WaveGridDecl);

View File

@ -0,0 +1,60 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 ps_WaveRipByteLen = 32;
static const UInt8 ps_WaveRipCodes[] = {
0x1, 0x1, 0xff, 0xff,
0x42, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xb0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0xb0,
0x0, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl ps_WaveRipDecl("sha/ps_WaveRip.inl", ps_WaveRip, ps_WaveRipByteLen, ps_WaveRipCodes);
static const plShaderRegister ps_WaveRipRegister(&ps_WaveRipDecl);

View File

@ -0,0 +1,94 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_BiasNormalsByteLen = 168;
static const UInt8 vs_BiasNormalsCodes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xc0,
0x0, 0x0, 0xe4, 0x90,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xc, 0x80,
0x4, 0x0, 0x80, 0xa0,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x0, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x1, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x2, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x3, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0xa0, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xd0,
0x5, 0x0, 0xa5, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_BiasNormalsDecl("sha/vs_BiasNormals.inl", vs_BiasNormals, vs_BiasNormalsByteLen, vs_BiasNormalsCodes);
static const plShaderRegister vs_BiasNormalsRegister(&vs_BiasNormalsDecl);

View File

@ -0,0 +1,94 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_CompCosinesByteLen = 168;
static const UInt8 vs_CompCosinesCodes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xc0,
0x0, 0x0, 0xe4, 0x90,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x0, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xe, 0x80,
0x4, 0x0, 0x80, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x1, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x2, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0x0, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x3, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_CompCosinesDecl("sha/vs_CompCosines.inl", vs_CompCosines, vs_CompCosinesByteLen, vs_CompCosinesCodes);
static const plShaderRegister vs_CompCosinesRegister(&vs_CompCosinesDecl);

View File

@ -0,0 +1,177 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_GrassShaderByteLen = 500;
static const UInt8 vs_GrassShaderCodes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0xb, 0x0, 0xe4, 0xa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, 0xc0,
0x2, 0x0, 0xe4, 0x80,
0x0, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xc0,
0x4, 0x0, 0xaa, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0xe4, 0x90,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0x7, 0x0, 0xe4, 0x90,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_GrassShaderDecl("sha/vs_GrassShader.inl", vs_GrassShader, vs_GrassShaderByteLen, vs_GrassShaderCodes);
static const plShaderRegister vs_GrassShaderRegister(&vs_GrassShaderDecl);

View File

@ -0,0 +1,357 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_ShoreLeave6ByteLen = 1220;
static const UInt8 vs_ShoreLeave6Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x19, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x8, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x9, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x55, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x6, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x0,
0x4, 0x0, 0xf, 0x80,
0xf, 0x0, 0xff, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0xf, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0,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
0x7, 0x0, 0xe4, 0x90,
0x14, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xf4, 0x80,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xf4, 0x80,
0x1, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xe0,
0x0, 0x0, 0xf4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_ShoreLeave6Decl("sha/vs_ShoreLeave6.inl", vs_ShoreLeave6, vs_ShoreLeave6ByteLen, vs_ShoreLeave6Codes);
static const plShaderRegister vs_ShoreLeave6Register(&vs_ShoreLeave6Decl);

View File

@ -0,0 +1,295 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_ShoreLeave7ByteLen = 972;
static const UInt8 vs_ShoreLeave7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x19, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x8, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x9, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x55, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x6, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x0,
0x4, 0x0, 0xf, 0x80,
0xf, 0x0, 0xff, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0xf, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x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, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_ShoreLeave7Decl("sha/vs_ShoreLeave7.inl", vs_ShoreLeave7, vs_ShoreLeave7ByteLen, vs_ShoreLeave7Codes);
static const plShaderRegister vs_ShoreLeave7Register(&vs_ShoreLeave7Decl);

View File

@ -0,0 +1,327 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDec1LayByteLen = 1100;
static const UInt8 vs_WaveDec1LayCodes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x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0x0, 0x0, 0xf, 0xc0,
0x9, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0xb, 0x0, 0xc, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xe, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec1LayDecl("sha/vs_WaveDec1Lay.inl", vs_WaveDec1Lay, vs_WaveDec1LayByteLen, vs_WaveDec1LayCodes);
static const plShaderRegister vs_WaveDec1LayRegister(&vs_WaveDec1LayDecl);

View File

@ -0,0 +1,293 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDec1Lay_7ByteLen = 964;
static const UInt8 vs_WaveDec1Lay_7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x12, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x7, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x8, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x55, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0xe4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xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec1Lay_7Decl("sha/vs_WaveDec1Lay_7.inl", vs_WaveDec1Lay_7, vs_WaveDec1Lay_7ByteLen, vs_WaveDec1Lay_7Codes);
static const plShaderRegister vs_WaveDec1Lay_7Register(&vs_WaveDec1Lay_7Decl);

View File

@ -0,0 +1,338 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport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x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0x9, 0x0, 0xff, 0x80,
0x1d, 0x0, 0x0, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xc0,
0xa, 0x0, 0x0, 0x80,
0x1d, 0x0, 0x55, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xc0,
0x9, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0xb, 0x0, 0xc, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xe, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x10, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x11, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec2Lay11Decl("sha/vs_WaveDec2Lay11.inl", vs_WaveDec2Lay11, vs_WaveDec2Lay11ByteLen, vs_WaveDec2Lay11Codes);
static const plShaderRegister vs_WaveDec2Lay11Register(&vs_WaveDec2Lay11Decl);

View File

@ -0,0 +1,304 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDec2Lay11_7ByteLen = 1008;
static const UInt8 vs_WaveDec2Lay11_7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x12, 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 0x1, 0x80,
0x9, 0x0, 0xff, 0x80,
0x1d, 0x0, 0x0, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xc0,
0xa, 0x0, 0x0, 0x80,
0x1d, 0x0, 0x55, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xc0,
0x9, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0xb, 0x0, 0xc, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xe, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x10, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0x11, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec2Lay11_7Decl("sha/vs_WaveDec2Lay11_7.inl", vs_WaveDec2Lay11_7, vs_WaveDec2Lay11_7ByteLen, vs_WaveDec2Lay11_7Codes);
static const plShaderRegister vs_WaveDec2Lay11_7Register(&vs_WaveDec2Lay11_7Decl);

View File

@ -0,0 +1,341 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDec2Lay12ByteLen = 1156;
static const UInt8 vs_WaveDec2Lay12Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x1, 0x80,
0x8, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0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x1, 0x0, 0x0, 0x0,
0xb, 0x0, 0xc, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xe, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x8, 0x0, 0xe4, 0x90,
0x10, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x8, 0x0, 0xe4, 0x90,
0x11, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec2Lay12Decl("sha/vs_WaveDec2Lay12.inl", vs_WaveDec2Lay12, vs_WaveDec2Lay12ByteLen, vs_WaveDec2Lay12Codes);
static const plShaderRegister vs_WaveDec2Lay12Register(&vs_WaveDec2Lay12Decl);

View File

@ -0,0 +1,307 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDec2Lay12_7ByteLen = 1020;
static const UInt8 vs_WaveDec2Lay12_7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x1, 0x80,
0x8, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x12, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x7, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x8, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x55, 0x80,
0x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x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0xb, 0x0, 0xc, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xe, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x7, 0x0, 0xe4, 0x90,
0xf, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x1, 0x80,
0x8, 0x0, 0xe4, 0x90,
0x10, 0x0, 0xe4, 0xa0,
0x9, 0x0, 0x0, 0x0,
0xb, 0x0, 0x2, 0x80,
0x8, 0x0, 0xe4, 0x90,
0x11, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xe0,
0xb, 0x0, 0xe4, 0x80,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDec2Lay12_7Decl("sha/vs_WaveDec2Lay12_7.inl", vs_WaveDec2Lay12_7, vs_WaveDec2Lay12_7ByteLen, vs_WaveDec2Lay12_7Codes);
static const plShaderRegister vs_WaveDec2Lay12_7Register(&vs_WaveDec2Lay12_7Decl);

View File

@ -0,0 +1,456 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDecEnvByteLen = 1616;
static const UInt8 vs_WaveDecEnvCodes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x1, 0x80,
0x8, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x2, 0x80,
0x9, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x12, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x7, 0x0, 0xe4, 0xa0,
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x80,
0xa, 0x0, 0xc0, 0x80,
0x8, 0x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0x3, 0x0, 0xe4, 0x80,
0x3, 0x0, 0xe4, 0x80,
0x7, 0x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x2, 0x0, 0xf, 0xe0,
0x3, 0x0, 0xe4, 0x80,
0xa, 0x0, 0xc0, 0x80,
0x8, 0x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0x2, 0x0, 0xe4, 0x80,
0x2, 0x0, 0xe4, 0x80,
0x7, 0x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xe0,
0x2, 0x0, 0xe4, 0x80,
0xa, 0x0, 0xc0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDecEnvDecl("sha/vs_WaveDecEnv.inl", vs_WaveDecEnv, vs_WaveDecEnvByteLen, vs_WaveDecEnvCodes);
static const plShaderRegister vs_WaveDecEnvRegister(&vs_WaveDecEnvDecl);

View File

@ -0,0 +1,490 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveDecEnv_7ByteLen = 1752;
static const UInt8 vs_WaveDecEnv_7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x0, 0x80,
0x7, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x1, 0x80,
0x8, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0x5, 0x0, 0x2, 0x80,
0x9, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x12, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0xd, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x7, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,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
0x7, 0x0, 0x0, 0x0,
0xa, 0x0, 0x1, 0x80,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x3, 0x0, 0xf, 0xe0,
0x2, 0x0, 0xe4, 0x80,
0xa, 0x0, 0xc0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0xd0,
0x5, 0x0, 0x15, 0x90,
0x1a, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveDecEnv_7Decl("sha/vs_WaveDecEnv_7.inl", vs_WaveDecEnv_7, vs_WaveDecEnv_7ByteLen, vs_WaveDecEnv_7Codes);
static const plShaderRegister vs_WaveDecEnv_7Register(&vs_WaveDecEnv_7Decl);

View File

@ -0,0 +1,534 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveFixedFin6ByteLen = 1928;
static const UInt8 vs_WaveFixedFin6Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x15, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x8, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x80,
0x4, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x9, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x55, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x5, 0x0, 0xe4, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x6, 0x0, 0xe4, 0xa0,
0x6, 0x0, 0x0, 0x0,
0x4, 0x0, 0xf, 0x80,
0xf, 0x0, 0xff, 0xa0,
0x2, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0xf, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x4, 0x0, 0xe4, 0x80,
0x4e, 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0x0,
0x0, 0x0, 0xf, 0x80,
0x0, 0x0, 0xe4, 0x80,
0x1, 0x0, 0x0, 0x80,
0x8, 0x0, 0x0, 0x0,
0x1, 0x0, 0x1, 0x80,
0x0, 0x0, 0xe4, 0x80,
0xb, 0x0, 0xe4, 0x80,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0x1, 0x80,
0x1, 0x0, 0x0, 0x80,
0x5, 0x0, 0xaa, 0x90,
0x2, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x1, 0x0, 0x0, 0x81,
0x2, 0x0, 0x0, 0x0,
0x1, 0x0, 0x8, 0x80,
0x1, 0x0, 0xff, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0x8, 0x80,
0x1, 0x0, 0xff, 0x80,
0x10, 0x0, 0x55, 0xa0,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0x80,
0x1, 0x0, 0xe4, 0x80,
0x4, 0x0, 0x15, 0x80,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0x7, 0x80,
0x1, 0x0, 0xe4, 0x80,
0x8, 0x0, 0x0, 0x80,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0x8, 0x80,
0x1, 0x0, 0xff, 0x80,
0x5, 0x0, 0x0, 0x90,
0x5, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xd0,
0x1, 0x0, 0xe4, 0x80,
0x14, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveFixedFin6Decl("sha/vs_WaveFixedFin6.inl", vs_WaveFixedFin6, vs_WaveFixedFin6ByteLen, vs_WaveFixedFin6Codes);
static const plShaderRegister vs_WaveFixedFin6Register(&vs_WaveFixedFin6Decl);

View File

@ -0,0 +1,521 @@
/*==LICENSE==*
CyanWorlds.com Engine - MMOG client, server and tools
Copyright (C) 2011 Cyan Worlds, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Additional permissions under GNU GPL version 3 section 7
If you modify this Program, or any covered work, by linking or
combining it with any of RAD Game Tools Bink SDK, Autodesk 3ds Max SDK,
NVIDIA PhysX SDK, Microsoft DirectX SDK, OpenSSL library, Independent
JPEG Group JPEG library, Microsoft Windows Media SDK, or Apple QuickTime SDK
(or a modified version of those libraries),
containing parts covered by the terms of the Bink SDK EULA, 3ds Max EULA,
PhysX SDK EULA, DirectX SDK EULA, OpenSSL and SSLeay licenses, IJG
JPEG Library README, Windows Media SDK EULA, or QuickTime SDK EULA, the
licensors of this Program grant you additional
permission to convey the resulting work. Corresponding Source for a
non-source form of such a combination shall include the source code for
the parts of OpenSSL and IJG JPEG Library used as well as that of the covered
work.
You can contact Cyan Worlds, Inc. by email legal@cyan.com
or by snail mail at:
Cyan Worlds, Inc.
14617 N Newport Hwy
Mead, WA 99021
*==LICENSE==*/
static const UInt32 vs_WaveFixedFin7ByteLen = 1876;
static const UInt8 vs_WaveFixedFin7Codes[] = {
0x1, 0x1, 0xfe, 0xff,
0x1f, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x80,
0x0, 0x0, 0xf, 0x90,
0x1f, 0x0, 0x0, 0x0,
0xa, 0x0, 0x0, 0x80,
0x5, 0x0, 0xf, 0x90,
0x15, 0x0, 0x0, 0x0,
0x6, 0x0, 0x7, 0x80,
0x0, 0x0, 0xe4, 0x90,
0x15, 0x0, 0xe4, 0xa0,
0x1, 0x0, 0x0, 0x0,
0x6, 0x0, 0x8, 0x80,
0x10, 0x0, 0xaa, 0xa0,
0x5, 0x0, 0x0, 0x0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a0,
0x1, 0x0, 0x0, 0x0,
0x1, 0x0, 0xf, 0xd0,
0x4, 0x0, 0xe4, 0xa0,
0xff, 0xff, 0x0, 0x0
};
static const plShaderDecl vs_WaveFixedFin7Decl("sha/vs_WaveFixedFin7.inl", vs_WaveFixedFin7, vs_WaveFixedFin7ByteLen, vs_WaveFixedFin7Codes);
static const plShaderRegister vs_WaveFixedFin7Register(&vs_WaveFixedFin7Decl);

Some files were not shown because too many files have changed in this diff Show More