_DarkWIng_ : that''s good news. keep up the good work.
If I had VC.NET (or if I could compile with VC6) I would like to debug too !
guppy: yes the screen enters into sleep, but I think the rest of the system also falls asleep. For instance, the num lock does not respond.
Porting Mirko's Ravers Nature for ATi
Hey, guys, I would love to see the missing scenes from this demo too! The part of the demo I could see was really cool. However, I tested the new zip and it killed my computer also. I have an ATI Radeon 9700 Pro. If you need to test anything else, I will do it. Good luck with this! I really hope you can do it!
Firebird Entertainment
Firebird Entertainment
“[The clergy] believe that any portion of power confided to me, will be exerted in opposition to their schemes. And they believe rightly: for I have sworn upon the altar of God, eternal hostility against every form of tyranny over the mind of man” - Thomas Jefferson
Just a question : Is there a single chance that VC.NET can save the project as VC6 project ? (*.dsp) This way *maybe* I could compile it and debug it.
you cant back save from VS.Net => VC6 as far as i know, and trust me i''ve looked a few times (perivous project i was required to work with VC6 projects but i wanted to use VC.Net but as i couldnt backport it i was stuck with VC6 *shudder*)
Finaly! I swaped my GF4 for Radeon9000 for a week. And after some debuging I wound the only line causing system crash was glBindFragmentShaderATI. If i disabe this or make shader empty (nothing between shader begin/end) it works just fine (nothing is drawn tho). Do you have some simple code using shaders around so I can try some stuff. I realy don''t have time to lear all this since I have card for only a week. Would you also be so nice to translate this RC to TC code. This is part of new terrain shader.
a bit OT : Is drawing lines on radeon *realy* slow or what?
You should never let your fears become the boundaries of your dreams.
glCombinerParameteriNV( GL_NUM_GENERAL_COMBINERS_NV, 2 );fogColor = white;glCombinerParameterfvNV( GL_CONSTANT_COLOR0_NV, fogColor.c ); // fog value// GCS #0glCombinerInputNV( GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_A_NV, GL_TEXTURE0_ARB, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glCombinerInputNV( GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_B_NV, GL_PRIMARY_COLOR_NV, GL_UNSIGNED_IDENTITY_NV, GL_ALPHA );glCombinerInputNV( GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_C_NV, GL_TEXTURE1_ARB, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glCombinerInputNV( GL_COMBINER0_NV, GL_RGB, GL_VARIABLE_D_NV, GL_PRIMARY_COLOR_NV, GL_UNSIGNED_INVERT_NV, GL_ALPHA );// A,B,C,D => SPARE0 = ( TexBase * bias ) + ( TexSlope * (1-bias) )glCombinerOutputNV( GL_COMBINER0_NV, GL_RGB, GL_DISCARD_NV, GL_DISCARD_NV, GL_SPARE0_NV, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );// GCS #1glCombinerInputNV( GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_A_NV, GL_SECONDARY_COLOR_NV, GL_UNSIGNED_INVERT_NV, GL_RGB );glCombinerInputNV( GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_B_NV, GL_SECONDARY_COLOR_NV, GL_UNSIGNED_INVERT_NV, GL_RGB );// A,B => SPARE1 = fogFactor^2glCombinerOutputNV( GL_COMBINER1_NV, GL_RGB, GL_SPARE1_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE );//Final combiner expression is (A*B) + ((1-A)*C) + D glFinalCombinerInputNV( GL_VARIABLE_A_NV, GL_SPARE0_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glFinalCombinerInputNV( GL_VARIABLE_B_NV, GL_PRIMARY_COLOR_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glFinalCombinerInputNV( GL_VARIABLE_C_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glFinalCombinerInputNV( GL_VARIABLE_D_NV, GL_ZERO, GL_UNSIGNED_IDENTITY_NV, GL_RGB );glFinalCombinerInputNV( GL_VARIABLE_G_NV, GL_SPARE1_NV, GL_UNSIGNED_IDENTITY_NV, GL_BLUE );
a bit OT : Is drawing lines on radeon *realy* slow or what?
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
my 9700 also says it does not support extentions but still runs great.
Dustin Davis
Owner / CEO
Programmers Unlimited
www.Programmers-Unlimited.com
Dustin Davis
Owner / CEO
Programmers Unlimited
www.Programmers-Unlimited.com
Dustin DavisOwner / CEOProgrammers Unlimitedwww.Programmers-Unlimited.com
Would you please point the shader that is causing the crash ?
in no case it should crash, but if there is a failure in the drivers, then causing an invalid GL operation may freeze the graphical server instead of generating an error.
If I were you I would query the error using glGetError .
Also, I''d be glad to see how you use the shader. I already said it, but it''s not like a RC setup.
For instance...
Typical usage of RC :
Equivalent with FS :
The main difference is that the RC is setup at every frame whereas the FS is setup once. If you setup the FS every frame (eg call glBeginFragmentShader and glEndFragmentShader every frame) this could cause serious problems with drivers.
Yes rendering wireframe is pretty slow, but so does it with GeForce as far as I''ve seen. Maybe a *bit* worse on Radeon though.
I''ll post the shader later. Please be patient.
in no case it should crash, but if there is a failure in the drivers, then causing an invalid GL operation may freeze the graphical server instead of generating an error.
If I were you I would query the error using glGetError .
Also, I''d be glad to see how you use the shader. I already said it, but it''s not like a RC setup.
For instance...
Typical usage of RC :
/* init. must be called once */// NOTHING/* destroy. must be called once */// NOTHING/* start using RC */glCombinerParameter( ... );glCombinerInput( ... );... // setup RC hereglEnable(GL_REGISTER_COMBINERS_NV);/* disable RC */glDisable(GL_REGISTER_COMBINERS_NV);
Equivalent with FS :
/* init. must be called once */shader = glGenFragmentShaders(1);glBindFragmentShader(shader);glBeginFragmentShader();glPassTexCoordATI( ... );glColorFragmentOp( ... );... // setup FS hereglEndFragmentShaderATI();/* destroy. must be called once */glDeleteFragmentShaderATI(shader);/* start using FS */glBindFragmentShader(shader);glEnable(GL_FRAGMENT_SHADER_ATI);/* disable FS */glDisable(GL_FRAGMENT_SHADER_ATI);
The main difference is that the RC is setup at every frame whereas the FS is setup once. If you setup the FS every frame (eg call glBeginFragmentShader and glEndFragmentShader every frame) this could cause serious problems with drivers.
Yes rendering wireframe is pretty slow, but so does it with GeForce as far as I''ve seen. Maybe a *bit* worse on Radeon though.
I''ll post the shader later. Please be patient.
The shader :
and later don''t forget to setup the constant every frame with
or you could consider setting up the constant in the shader if the constant never changes along with the time.
Also, don''t forget to disable fog if needed, since RC stage overrides fogging but FS doesn''t override it.
shader = glGenFragmentShadersATI(1);glBindFragmentShaderATI(shader);glBeginFragmentShaderATI();{ // Get texture0 into reg0 and texture1 into reg1 glSampleMapATI(GL_REG_0_ATI, GL_TEXTURE0_ARB, GL_SWIZZLE_STR_ATI); glSampleMapATI(GL_REG_1_ATI, GL_TEXTURE1_ARB, GL_SWIZZLE_STR_ATI); // reg0 = primary_a*tex0+(1-primary_a)*tex1 = bias*texBase+(1-base)*texSlope glColorFragmentOp3ATI(GL_LERP_ATI, GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI, GL_PRIMARY_COLOR_ARB, GL_ALPHA, GL_NONE, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_REG_1_ATI, GL_NONE, GL_NONE); // output_rgb = reg0rgb = reg0 * primary_rgb glColorFragmentOp2ATI(GL_MUL_ATI, GL_REG_0_ATI, GL_NONE, GL_SATURATE_BIT_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE, GL_PRIMARY_COLOR_ARB, GL_NONE, GL_NONE); // output_alpha = reg0a = (1-secondary)*(1-secondary) = fogFactor^2 glAlphaFragmentOp2ATI(GL_MUL_ATI, GL_REG_0_ATI, GL_SATURATE_BIT_ATI, GL_SECONDARY_INTERPOLATOR_ATI, GL_BLUE, GL_COMP_BIT_ATI, GL_SECONDARY_INTERPOLATOR_ATI, GL_BLUE, GL_COMP_BIT_ATI);}glEndFragmentShaderATI();
and later don''t forget to setup the constant every frame with
glSetFragmentShaderConstantATI(GL_CON_0_ATI, fogColor.c);
or you could consider setting up the constant in the shader if the constant never changes along with the time.
Also, don''t forget to disable fog if needed, since RC stage overrides fogging but FS doesn''t override it.
Well... It kind of works now. I made a new app just to test this terrain shader. Now it works except for some wierd bug with texture mixing... but it''s probably something with vertex program of even normal array. But when compiling together with demo it still crashes... I''ve got some ideas what to try next...
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
YES!!! Finaly! It works! You would not belive what coused the problem. I enabled GL_COLOR_SUM_ARB when I switched from NV to ARB vertex programs so I could use secondary color. But ATI drivers somehow don''t like it if I leave it enabled. So I have to disable it when I don''t need it anymore on ATI while NV drivers just ignore it... ATI : Learn from NV! The secont problem was (not the crashig caouse) with alpha component of primary color. This is a perferct valid line of ARB_VP that somehow dosn''t work on ATI:
Alpha is always 0. For fun I filled normals with random values in range [0..1]. I just hope this is a bug in drivers.
Well the demo is finaly starting to run on ATI.. I still have some work to do but I should have "stable" verison by friday.. I hope
. I spent last few hour reading trough TS specifications... They are very simmilar to RC... I''ve translated part of TSBM shader by myself... I''ll do the rest by tommorow... Would anyone be angry if I include extra scene in this demo? I''ve made a realy cool one but it doesn''t fit into LOTR theme so...
You should never let your fears become the boundaries of your dreams.
MOV oColor0.w, iNormal.y;
Alpha is always 0. For fun I filled normals with random values in range [0..1]. I just hope this is a bug in drivers.
Well the demo is finaly starting to run on ATI.. I still have some work to do but I should have "stable" verison by friday.. I hope

You should never let your fears become the boundaries of your dreams.
You should never let your fears become the boundaries of your dreams.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement