User:Darkblueskies

From Bo3b's School for Shaderhackers
Jump to: navigation, search

Lesson 0

TheBall002 050.jpg


Lesson 1

//
// Generated by Microsoft (R) HLSL Shader Compiler 9.27.952.3022
//
// Parameters:
//
//   float4 MinZ_MaxZRatio;
//   sampler2D Texture2D_0;
//   sampler2D Texture2D_1;
//   float UniformPixelScalar_10;
//   float UniformPixelScalar_9;
//   float4 UniformPixelVector_0;
//   float4 UniformPixelVector_1;
//   float4 UniformPixelVector_2;
//   float4 UniformPixelVector_4;
//
//
// Registers:
//
//   Name                  Reg   Size
//   --------------------- ----- ----
//   UniformPixelVector_0  c0       1
//   MinZ_MaxZRatio        c2       1
//   UniformPixelVector_1  c4       1
//   UniformPixelVector_2  c5       1
//   UniformPixelVector_4  c6       1
//   UniformPixelScalar_9  c7       1
//   UniformPixelScalar_10 c8       1
//   Texture2D_0           s0       1
//   Texture2D_1           s1       1
//

    ps_3_0
    def c1, 0.75, -9.99999997e-007, 0, 6
    def c3, -1, -0.333299994, 0.666700006, 0.200000003
    def c9, 4, 2, -2, 0.449999988
    dcl_texcoord v0.xy
    dcl_texcoord5 v1.w
    dcl_2d s0
    dcl_2d s1
    mul r0.xy, c1.x, v0
    texld r0, r0, s1
    add r0.y, r0_abs.x, c1.y
    pow r1.x, r0_abs.x, c8.x
    cmp r0.y, r0.y, r1.x, c1.z
    lrp r1.x, c7.x, r0.y, r0.x
    mul r0.x, r1.x, c7.x
    mul_sat r0.x, r0.x, c1.w
    add r0.x, r0.x, c3.y
    mov r1.xw, c3
    add r0.y, r1.x, c7.x
    cmp r0, r0.y, c3.z, r0.x
    texkill r0
    mad r0.xy, v0, r1.w, c5
    texld r0, r0, s0
    mad r0.x, r0.y, c9.x, c9.y
    mov r0.z, c9.z
    add r0.yzw, r0.z, c6.xxyz
    mad r0.yzw, r0, c9.w, c9.y
    mul r0.xyz, r0.yzww, r0.x
    mov r1.xyz, c4
    mad_pp oC0.xyz, r1, r0, c0
    rcp r0.x, v1.w
    mad_pp oC0.w, c2.x, r0.x, c2.y

// approximately 26 instruction slots used (2 texture, 24 arithmetic)
 

Lesson 2

Before: TheBall001 050.jpg

After: TheBall003 050.jpg