summaryrefslogtreecommitdiffstats
path: root/src/demos/hdr/shaders/arbfp1
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2009-06-15 23:12:27 +0000
committerKenneth Russel <[email protected]>2009-06-15 23:12:27 +0000
commit41cd6c47b23975098cd155517790e018670785e7 (patch)
tree247333528ad674d427ba96b1e05810f7961d609e /src/demos/hdr/shaders/arbfp1
parent935d2596c13371bb745d921dbcb9f05b0c11a010 (diff)
Copied JOGL_2_SANDBOX r350 on to trunk; JOGL_2_SANDBOX branch is now closed
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/jogl-demos/trunk@352 3298f667-5e0e-4b4a-8ed4-a3559d26a5f4
Diffstat (limited to 'src/demos/hdr/shaders/arbfp1')
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/object.arbfp141
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/object_hilo.arbfp145
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/object_vp.arbvp142
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/recompile.txt7
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/shrink.arbfp134
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/skybox.arbfp122
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/skybox_hilo.arbfp127
-rwxr-xr-xsrc/demos/hdr/shaders/arbfp1/tonemap.arbfp164
8 files changed, 282 insertions, 0 deletions
diff --git a/src/demos/hdr/shaders/arbfp1/object.arbfp1 b/src/demos/hdr/shaders/arbfp1/object.arbfp1
new file mode 100755
index 0000000..30ee986
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/object.arbfp1
@@ -0,0 +1,41 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/object.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.envMap : TEXUNIT0
+#var float4 In.HPosition : : : 0 : 0
+#var float4 In.P : : : 0 : 0
+#var float3 In.N : $vin.TEX1 : TEX1 : 0 : 1
+#var float3 In.I : $vin.TEX2 : TEX2 : 0 : 1
+#var samplerCUBE envMap : TEXUNIT0 : texunit 0 : 1 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 2 1 0 5
+#const c[1] = 0.9799805 0.02000427
+PARAM c[2] = { { 2, 1, 0, 5 },
+ { 0.97998047, 0.020004272 } };
+TEMP R0;
+TEMP R1;
+DP3 R0.y, fragment.texcoord[2], fragment.texcoord[2];
+RSQ R0.w, R0.y;
+DP3 R0.x, fragment.texcoord[1], fragment.texcoord[1];
+RSQ R0.x, R0.x;
+MUL R1.xyz, R0.w, fragment.texcoord[2];
+MUL R0.xyz, R0.x, fragment.texcoord[1];
+DP3 R0.w, -R1, R0;
+ADD R0.w, -R0, c[0].y;
+DP3 R1.w, R0, R1;
+MAX R0.w, R0, c[0].z;
+MUL R0.xyz, R0, R1.w;
+POW R0.w, R0.w, c[0].w;
+MAD R0.xyz, -R0, c[0].x, R1;
+MAD R0.w, R0, c[1].x, c[1].y;
+TEX R0.xyz, R0, texture[0], CUBE;
+MUL result.color.xyz, R0, R0.w;
+MOV result.color.w, c[0].y;
+END
+# 17 instructions, 2 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/object_hilo.arbfp1 b/src/demos/hdr/shaders/arbfp1/object_hilo.arbfp1
new file mode 100755
index 0000000..c6d5b55
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/object_hilo.arbfp1
@@ -0,0 +1,45 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/object_hilo.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.envMap_rg : TEXUNIT0
+#semantic main.envMap_b : TEXUNIT1
+#var float4 In.HPosition : : : 0 : 0
+#var float4 In.P : : : 0 : 0
+#var float3 In.N : $vin.TEX1 : TEX1 : 0 : 1
+#var float3 In.I : $vin.TEX2 : TEX2 : 0 : 1
+#var samplerCUBE envMap_rg : TEXUNIT0 : texunit 0 : 1 : 1
+#var samplerCUBE envMap_b : TEXUNIT1 : texunit 1 : 2 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 2 1 0 5
+#const c[1] = 0.9799805 0.02000427
+PARAM c[2] = { { 2, 1, 0, 5 },
+ { 0.97998047, 0.020004272 } };
+TEMP R0;
+TEMP R1;
+DP3 R0.y, fragment.texcoord[2], fragment.texcoord[2];
+RSQ R0.y, R0.y;
+DP3 R0.x, fragment.texcoord[1], fragment.texcoord[1];
+MUL R1.xyz, R0.y, fragment.texcoord[2];
+RSQ R0.x, R0.x;
+MUL R0.xyz, R0.x, fragment.texcoord[1];
+DP3 R0.w, -R1, R0;
+DP3 R1.w, R0, R1;
+MUL R0.xyz, R0, R1.w;
+MAD R1.xyz, -R0, c[0].x, R1;
+ADD R0.w, -R0, c[0].y;
+MAX R0.y, R0.w, c[0].z;
+TEX R0.x, R1, texture[1], CUBE;
+POW R0.y, R0.y, c[0].w;
+MOV R0.z, R0.x;
+MAD R0.w, R0.y, c[1].x, c[1].y;
+TEX R0.xy, R1, texture[0], CUBE;
+MUL result.color.xyz, R0, R0.w;
+MOV result.color.w, c[0].y;
+END
+# 19 instructions, 2 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/object_vp.arbvp1 b/src/demos/hdr/shaders/arbfp1/object_vp.arbvp1
new file mode 100755
index 0000000..1f2a6fa
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/object_vp.arbvp1
@@ -0,0 +1,42 @@
+!!ARBvp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbvp1
+# source file: ../cg/object_vp.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbvp1
+#program main
+#semantic main.modelViewProj
+#semantic main.model
+#semantic main.eyePos
+#var float4 In.Position : $vin.POSITION : POSITION : 0 : 1
+#var float4 In.Normal : $vin.NORMAL : NORMAL : 0 : 1
+#var float4x4 modelViewProj : : c[0], 4 : 1 : 1
+#var float4x4 model : : c[4], 4 : 2 : 1
+#var float3 eyePos : : c[8] : 3 : 1
+#var float4 main.HPosition : $vout.HPOS : HPOS : -1 : 1
+#var float4 main.P : $vout.TEX0 : TEX0 : -1 : 1
+#var float3 main.N : $vout.TEX1 : TEX1 : -1 : 1
+#var float3 main.I : $vout.TEX2 : TEX2 : -1 : 1
+PARAM c[9] = { program.local[0..8] };
+TEMP R0;
+TEMP R1;
+DP4 result.position.w, vertex.position, c[3];
+DP4 result.position.z, vertex.position, c[2];
+DP4 result.position.y, vertex.position, c[1];
+DP4 result.position.x, vertex.position, c[0];
+DP4 R0.w, vertex.position, c[7];
+DP4 R0.z, vertex.position, c[6];
+DP4 R0.y, vertex.position, c[5];
+DP3 R1.z, vertex.normal, c[6];
+DP3 R1.y, vertex.normal, c[5];
+DP3 R1.x, vertex.normal, c[4];
+DP4 R0.x, vertex.position, c[4];
+DP3 R1.w, R1, R1;
+ADD result.texcoord[2].xyz, R0, -c[8];
+RSQ R1.w, R1.w;
+MOV result.texcoord[0], R0;
+MUL result.texcoord[1].xyz, R1.w, R1;
+END
+# 16 instructions, 2 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/recompile.txt b/src/demos/hdr/shaders/arbfp1/recompile.txt
new file mode 100755
index 0000000..48469f3
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/recompile.txt
@@ -0,0 +1,7 @@
+cgc -profile arbfp1 -o object.arbfp1 ../cg/object.cg
+cgc -profile arbfp1 -o object_hilo.arbfp1 ../cg/object_hilo.cg
+cgc -profile arbvp1 -o object_vp.arbvp1 ../cg/object_vp.cg
+cgc -profile arbfp1 -o shrink.arbfp1 ../cg/shrink.cg
+cgc -profile arbfp1 -o skybox.arbfp1 ../cg/skybox.cg
+cgc -profile arbfp1 -o skybox_hilo.arbfp1 ../cg/skybox_hilo.cg
+cgc -profile arbfp1 -o tonemap.arbfp1 ../cg/tonemap.cg
diff --git a/src/demos/hdr/shaders/arbfp1/shrink.arbfp1 b/src/demos/hdr/shaders/arbfp1/shrink.arbfp1
new file mode 100755
index 0000000..ddf7a4b
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/shrink.arbfp1
@@ -0,0 +1,34 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/shrink.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.sceneTex : TEXUNIT0
+#var float4 In.wpos : : : 0 : 0
+#var float3 In.tex0 : $vin.TEX0 : TEX0 : 0 : 1
+#var float3 In.tex1 : : : 0 : 0
+#var float4 In.col0 : : : 0 : 0
+#var samplerRECT sceneTex : TEXUNIT0 : texunit 0 : 1 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 1 0 0.25
+PARAM c[1] = { { 1, 0, 0.25 } };
+TEMP R0;
+TEMP R1;
+TEMP R2;
+ADD R0.xy, fragment.texcoord[0], c[0];
+TEX R1, R0, texture[0], RECT;
+TEX R0, fragment.texcoord[0], texture[0], RECT;
+ADD R2, R0, R1;
+ADD R0.xy, fragment.texcoord[0], c[0].yxzw;
+ADD R1.xy, fragment.texcoord[0], c[0].x;
+TEX R0, R0, texture[0], RECT;
+TEX R1, R1, texture[0], RECT;
+ADD R0, R2, R0;
+ADD R0, R0, R1;
+MUL result.color, R0, c[0].z;
+END
+# 11 instructions, 3 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/skybox.arbfp1 b/src/demos/hdr/shaders/arbfp1/skybox.arbfp1
new file mode 100755
index 0000000..8d3d9db
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/skybox.arbfp1
@@ -0,0 +1,22 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/skybox.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.envMap : TEXUNIT0
+#var float4 In.wpos : : : 0 : 0
+#var float3 In.tex0 : $vin.TEX0 : TEX0 : 0 : 1
+#var float3 In.tex1 : : : 0 : 0
+#var float4 In.col0 : : : 0 : 0
+#var samplerCUBE envMap : TEXUNIT0 : texunit 0 : 1 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 1
+PARAM c[1] = { { 1 } };
+TEX result.color.xyz, fragment.texcoord[0], texture[0], CUBE;
+MOV result.color.w, c[0].x;
+END
+# 2 instructions, 0 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/skybox_hilo.arbfp1 b/src/demos/hdr/shaders/arbfp1/skybox_hilo.arbfp1
new file mode 100755
index 0000000..fe0d910
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/skybox_hilo.arbfp1
@@ -0,0 +1,27 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/skybox_hilo.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.envMap_rg : TEXUNIT0
+#semantic main.envMap_b : TEXUNIT1
+#var float4 In.wpos : : : 0 : 0
+#var float3 In.tex0 : $vin.TEX0 : TEX0 : 0 : 1
+#var float3 In.tex1 : : : 0 : 0
+#var float4 In.col0 : : : 0 : 0
+#var samplerCUBE envMap_rg : TEXUNIT0 : texunit 0 : 1 : 1
+#var samplerCUBE envMap_b : TEXUNIT1 : texunit 1 : 2 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 1
+PARAM c[1] = { { 1 } };
+TEMP R0;
+TEX R0.x, fragment.texcoord[0], texture[1], CUBE;
+TEX result.color.xy, fragment.texcoord[0], texture[0], CUBE;
+MOV result.color.z, R0.x;
+MOV result.color.w, c[0].x;
+END
+# 4 instructions, 1 R-regs
diff --git a/src/demos/hdr/shaders/arbfp1/tonemap.arbfp1 b/src/demos/hdr/shaders/arbfp1/tonemap.arbfp1
new file mode 100755
index 0000000..0dd5a5a
--- /dev/null
+++ b/src/demos/hdr/shaders/arbfp1/tonemap.arbfp1
@@ -0,0 +1,64 @@
+!!ARBfp1.0
+# cgc version 1.3.0001, build date Aug 4 2004 10:01:10
+# command line args: -profile arbfp1
+# source file: ../cg/tonemap.cg
+# source file: ../cg/hdr.cg
+#vendor NVIDIA Corporation
+#version 1.0.02
+#profile arbfp1
+#program main
+#semantic main.sceneTex : TEXUNIT0
+#semantic main.blurTex : TEXUNIT1
+#semantic main.gammaTex : TEXUNIT2
+#semantic main.vignetteTex : TEXUNIT3
+#semantic main.blurAmount
+#semantic main.windowSize
+#semantic main.exposure
+#var float4 In.wpos : : : 0 : 0
+#var float3 In.tex0 : $vin.TEX0 : TEX0 : 0 : 1
+#var float3 In.tex1 : $vin.TEX1 : TEX1 : 0 : 1
+#var float4 In.col0 : : : 0 : 0
+#var samplerRECT sceneTex : TEXUNIT0 : texunit 0 : 1 : 1
+#var samplerRECT blurTex : TEXUNIT1 : texunit 1 : 2 : 1
+#var sampler1D gammaTex : TEXUNIT2 : texunit 2 : 3 : 1
+#var samplerRECT vignetteTex : TEXUNIT3 : texunit 3 : 4 : 1
+#var float blurAmount : : c[1] : 5 : 1
+#var float4 windowSize : : : 6 : 0
+#var float exposure : : c[2] : 7 : 1
+#var half4 main : $vout.COL : COL : -1 : 1
+#const c[0] = 1 0
+PARAM c[3] = { { 1, 0 },
+ program.local[1..2] };
+TEMP R0;
+TEMP R1;
+TEMP R2;
+TEMP R3;
+TEMP R4;
+ADD R0.xy, fragment.texcoord[1], c[0].yxzw;
+ADD R1.xy, fragment.texcoord[1], c[0].x;
+TEX R1.xyz, R1, texture[1], RECT;
+TEX R0.xyz, R0, texture[1], RECT;
+ADD R3.xyz, R1, -R0;
+FRC R4.xy, fragment.texcoord[1];
+ADD R1.xy, fragment.texcoord[1], c[0];
+TEX R2.xyz, fragment.texcoord[1], texture[1], RECT;
+TEX R1.xyz, R1, texture[1], RECT;
+ADD R1.xyz, R1, -R2;
+MAD R1.xyz, R4.x, R1, R2;
+MAD R0.xyz, R4.x, R3, R0;
+ADD R2.xyz, R0, -R1;
+TEX R0.xyz, fragment.texcoord[0], texture[0], RECT;
+MAD R1.xyz, R4.y, R2, R1;
+ADD R1.xyz, R1, -R0;
+MAD R1.xyz, R1, c[1].x, R0;
+MUL R1.xyz, R1, c[2].x;
+TEX R0.xyz, fragment.texcoord[0], texture[3], RECT;
+MUL R0.xyz, R1, R0;
+TEX result.color.x, R0, texture[2], 1D;
+TEX R0.x, R0.y, texture[2], 1D;
+TEX R1.x, R0.z, texture[2], 1D;
+MOV result.color.y, R0.x;
+MOV result.color.z, R1.x;
+MOV result.color.w, c[0].x;
+END
+# 26 instructions, 5 R-regs