[quote name=‘LeBaronNoir’ date=’ 8 Jan 2005, 11:29’]Moui. Je vois mieux la différence qu’avec le screen de KotOR. D’un autre côté, quand je vois ceux de Doom 3, je trouve que ça a tendance à éclaircir un peu trop l’image. Bon, je vais essayer pour me faire ma propre opinion.
C’est sacrément violent comme effet et on voit bien que KotOR par exemple, n’a pas été prévu pour en tirer parti. Le sol sur Taris est d’une blancheur éblouissante, les personnages dans les vaisseaux donnent l’impression d’être éclairés par une chaude lumière solaire. Bref, je trouve que c’est encore un peu excessif comme effet.
[right][post=“320217”]<{POST_SNAPBACK}>[/post][/right][/quote]
Oups, j’ai utilisé une version modifié du HDRish. Une version moins tape à l’oeil.
Voici le tout nouveau HDR.
Alors il te faut créer un fichier txt, puis renomme le comme tu veux, (par exemple : HDRish_Light.pss ). Et ouvre ensuite ce fichier .pss que tu viens de créer avec le notepad et colle le code suivant.
Charge ce fichier sous le pssControl2.exe et lance un jeu.
[code]shader samplePixelShader =
"!!ARBfp1.0
TEMP Temp;
TEX result.color, fragment.texcoord[0], texture[0], 2D;
END";
shader gaussianXPixelShader =
"!!ARBfp1.0
PARAM Offset[11]={ program.local[0…10] };
PARAM Weight[3]=
{
{ 0.2, 0.1, 0.05, 0.02 },
{ 0.02, 0.01, 0.005, 0.002 },
{ 0.004, 0.002, 0.001, 0.00025 }
};
TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;
ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 8], fragment.texcoord[0];
ADD r2, -Offset[ 7], fragment.texcoord[0];
ADD r3, -Offset[ 6], fragment.texcoord[0];
ADD r4, -Offset[ 5], fragment.texcoord[0];
ADD r5, -Offset[ 4], fragment.texcoord[0];
ADD r6, -Offset[ 3], fragment.texcoord[0];
ADD r7, -Offset[ 2], fragment.texcoord[0];
ADD r8, -Offset[ 1], fragment.texcoord[0];
ADD r9, -Offset[ 0], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];
TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;
TEX s0, s0, texture[0], 2D;
MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[1].w, s0;
MAD s0, r1, Weight[1].z, s0;
MAD s0, r2, Weight[1].y, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;
ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 1], fragment.texcoord[0];
ADD r2, Offset[ 2], fragment.texcoord[0];
ADD r3, Offset[ 3], fragment.texcoord[0];
ADD r4, Offset[ 4], fragment.texcoord[0];
ADD r5, Offset[ 5], fragment.texcoord[0];
ADD r6, Offset[ 6], fragment.texcoord[0];
ADD r7, Offset[ 7], fragment.texcoord[0];
ADD r8, Offset[ 8], fragment.texcoord[0];
ADD r9, Offset[ 9], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];
TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;
MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[1].y, s0;
MAD s0, r9, Weight[1].z, s0;
MAD s0, r10, Weight[1].w, s0;
MOV result.color, s0;
END";
shader gaussianYPixelShader =
"!!ARBfp1.0
PARAM Offset[11]={ program.local[0…10] };
PARAM Weight[3]=
{
{ 0.2, 0.1, 0.05, 0.02 },
{ 0.02, 0.01, 0.005, 0.002 },
{ 0.004, 0.002, 0.001, 0.00025 }
};
TEMP s0, r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10;
ADD r0, -Offset[10], fragment.texcoord[0];
ADD r1, -Offset[ 9], fragment.texcoord[0];
ADD r2, -Offset[ 8], fragment.texcoord[0];
ADD r3, -Offset[ 7], fragment.texcoord[0];
ADD r4, -Offset[ 6], fragment.texcoord[0];
ADD r5, -Offset[ 5], fragment.texcoord[0];
ADD r6, -Offset[ 4], fragment.texcoord[0];
ADD r7, -Offset[ 3], fragment.texcoord[0];
ADD r8, -Offset[ 2], fragment.texcoord[0];
ADD r9, -Offset[ 1], fragment.texcoord[0];
ADD r10, -Offset[ 0], fragment.texcoord[0];
MOV s0, fragment.texcoord[0];
TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;
TEX s0, s0, texture[0], 2D;
MUL s0, s0, Weight[0].x;
MAD s0, r0, Weight[1].w, s0;
MAD s0, r1, Weight[1].z, s0;
MAD s0, r2, Weight[1].y, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].w, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].y, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[0].w, s0;
MAD s0, r9, Weight[0].z, s0;
MAD s0, r10, Weight[0].y, s0;
ADD r0, Offset[ 0], fragment.texcoord[0];
ADD r1, Offset[ 0], fragment.texcoord[0];
ADD r2, Offset[ 1], fragment.texcoord[0];
ADD r3, Offset[ 2], fragment.texcoord[0];
ADD r4, Offset[ 3], fragment.texcoord[0];
ADD r5, Offset[ 4], fragment.texcoord[0];
ADD r6, Offset[ 5], fragment.texcoord[0];
ADD r7, Offset[ 6], fragment.texcoord[0];
ADD r8, Offset[ 7], fragment.texcoord[0];
ADD r9, Offset[ 8], fragment.texcoord[0];
ADD r10, Offset[10], fragment.texcoord[0];
TEX r0, r0, texture[0], 2D;
TEX r1, r1, texture[0], 2D;
TEX r2, r2, texture[0], 2D;
TEX r3, r3, texture[0], 2D;
TEX r4, r4, texture[0], 2D;
TEX r5, r5, texture[0], 2D;
TEX r6, r6, texture[0], 2D;
TEX r7, r7, texture[0], 2D;
TEX r8, r8, texture[0], 2D;
TEX r9, r9, texture[0], 2D;
TEX r10, r10, texture[0], 2D;
MAD s0, r0, Weight[0].y, s0;
MAD s0, r1, Weight[0].z, s0;
MAD s0, r2, Weight[0].w, s0;
MAD s0, r3, Weight[1].x, s0;
MAD s0, r4, Weight[1].y, s0;
MAD s0, r5, Weight[1].z, s0;
MAD s0, r6, Weight[1].w, s0;
MAD s0, r7, Weight[1].x, s0;
MAD s0, r8, Weight[1].y, s0;
MAD s0, r9, Weight[1].z, s0;
MAD s0, r10, Weight[1].w, s0;
MOV result.color, s0;
END";
shader outputPixelShader =
"!!ARBfp1.0
TEMP back, blur;
TEX blur, fragment.texcoord[0], texture[0], 2D;
TEX back, fragment.texcoord[0], texture[1], 2D;
ADD blur, blur, blur;
ADD result.color, back, blur;
END";
shader outputPixelShader2 =
"!!ARBfp1.0
threshold for tag shader (try different values)
PARAM thresh = {0.5, 0.5, 0.5, 0.5};
TEMP back, blur, temp;
TEX blur, fragment.texcoord[0], texture[0], 2D;
TEX back, fragment.texcoord[0], texture[1], 2D;
subtract threshold value from the ‘back’ value
SUB temp, back, thresh;
if temp value is smaller than threshold, kill fragment
KIL blur;
ADD result.color, back, blur;
END";
surface blur0 = allocsurf(width/8, height/8);
surface blur1 = allocsurf(width/8, height/8);
gaussianXPixelShader.constant[ 0] = { (4.0ds_dx) 1.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 1] = { (4.0ds_dx) 3.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 2] = { (4.0ds_dx) 5.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 3] = { (4.0ds_dx) 7.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 4] = { (4.0ds_dx) 9.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 5] = { (4.0*ds_dx)11.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 6] = { (4.0ds_dx)13.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 7] = { (4.0ds_dx)15.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 8] = { (4.0ds_dx)17.45, 0, 0, 0 };
gaussianXPixelShader.constant[ 9] = { (4.0ds_dx)19.45, 0, 0, 0 };
gaussianXPixelShader.constant[10] = { (4.0ds_dx)*21.45, 0, 0, 0 };
gaussianYPixelShader.constant[ 0] = { 0, (4.0dt_dy) 1.45, 0, 0 };
gaussianYPixelShader.constant[ 1] = { 0, (4.0dt_dy) 3.45, 0, 0 };
gaussianYPixelShader.constant[ 2] = { 0, (4.0dt_dy) 5.45, 0, 0 };
gaussianYPixelShader.constant[ 3] = { 0, (4.0dt_dy) 7.45, 0, 0 };
gaussianYPixelShader.constant[ 4] = { 0, (4.0dt_dy) 9.45, 0, 0 };
gaussianYPixelShader.constant[ 5] = { 0, (4.0*dt_dy)11.45, 0, 0 };
gaussianYPixelShader.constant[ 6] = { 0, (4.0dt_dy)13.45, 0, 0 };
gaussianYPixelShader.constant[ 7] = { 0, (4.0dt_dy)15.45, 0, 0 };
gaussianYPixelShader.constant[ 8] = { 0, (4.0dt_dy)17.45, 0, 0 };
gaussianYPixelShader.constant[ 9] = { 0, (4.0dt_dy)19.45, 0, 0 };
gaussianYPixelShader.constant[10] = { 0, (4.0dt_dy)*21.45, 0, 0 };
texture[0].magfilter = “linear”;
texture[0].source = backbuffer;
destination blur0;
apply samplePixelShader;
texture[0].source = blur0;
destination blur1;
apply gaussianXPixelShader;
texture[0].source = blur1;
destination blur0;
apply gaussianYPixelShader;
texture[0].source = blur0;
texture[0].source = blur1;
texture[1].source = backbuffer;
destination backbuffer;
apply outputPixelShader2;[/code]