Jump to content
  • Advertisement

KumGame

Member
  • Content Count

    34
  • Joined

  • Last visited

Community Reputation

122 Neutral

About KumGame

  • Rank
    Member
  1. KumGame

    FXC error

    Hello all, I have observed another strange behaviour. My .fx file had some '#include's. I just removed those '#include's and moved only those declarations & definitions which are needed in my .fx file from '#include'ed file to my .fx file. IT COMPILED PROPERLY. So my worry is that, if only few of the variables/functions from the included file is getting used, why the 'fxc' gives the error 'maximum constant register index exceeded' ? Sorry I couldn't post my .fx file here. Thanks in advance, KumGame
  2. KumGame

    Is this possible?

    Thanks for the reply
  3. Hi gang, I am using Mac OS X and want to create a screen saver using OpenGL. I have a simple OpenGL application using GLUT, which runs on fullscreen mode, similar to a screen saver (I have used simple rendering). But my next challenge is to make that application a screen saver. Any idea how should I do that? Thanks
  4. Something is wrong in your way of calculating fragment color... As somebody had already suggested, use gl_FragColor = texval1 * texval2. Or try gl_FragColor = (0.5 * texval1 + 0.5 * texval2). glUniform1iARB(p, 0); glUniform1iARB(q, 1); Are these p & q global? So verify that your uniforms (samplers) are set proper values (0 & 1).
  5. KumGame

    GL Shading Language problem

    gl_TexCoord[0] refers to the coordinates of the 0th texture unit. .st is used to smear the vector. It means, you are aceesing/assigning only 2 (s & t) components of the vector depending on the usage of it vector.
  6. Ok.. Thanks for the reply... But still, "Is it same as setting the world matrix (D3DTS_WORLD) in FFP?"
  7. Hi gang, Can anyone brief me about how the transform states work in the case of fx files? I have posted a sample code using which I explain what I really want to know ;-) ----------------------------- float4x4 world ; // world matrix shared float4x4 camera ; // view matrix texture texture0 : TEXTURE0 ; // first texture technique singlepass { pass p0 { AlphaBlendEnable = False; Texture[0]=<texture0>; ColorOp[0]=SelectArg1; ColorArg1[0]=Texture; ColorOp[1]=Disable; WorldTransform[0]=<world>; ViewTransform=<camera>; } } ------------------------------- I just want to know why the array subscript is used for WorldTransform ? Is it same as setting the world matrix (D3DTS_WORLD) in FFP? Thanks in advance
  8. KumGame

    FXC error

    Thanks for the reply.. But any idea why it compiles without any error on a lower version of shder compiler?
  9. KumGame

    FXC error

    Hi all, I'm working on DirectX fx files. What I exactly want is to generate assembly shaders from the fx files. For this I'm using the 'fxc' tool.. I'm using an ATI Radeon 9200 card and D3DX9 Shader Compiler 9.12.589.0000 Unfortunately I get the following error for almost all my fx files (though I tried to reduce the number of constants used in the file) error X4507: maximum constant register index exceeded - Try reducing number of constants referenced How do I know that how many constants I can use in my shader? Interestingly, the same fx file was compiled without any error when I used the compiler D3DX9 Shader Compiler 5.04.00.3900 Why is this happening? Thanks in advance ;-)
  10. KumGame

    Function Pointers

    A big thanks to Zahlman..... I was not aware of '.*' ...
  11. Hi all.. I want some help on array of function pointers in C++. I have a class consisting of few functions.. class A { public : void f1(); void f2(); ..... } In my main() I have something like, main() { void (A::*fptr[2])(); fptr[0] = &A::f1(); fptr[1] = &A::f2(); fptr[0](); // doesn't work } Now, how can I invoke those functions f1() & f2() ? I have tried placing the array of function pointers within the class but no result.
  12. KumGame

    State blocks in effect files

    Now I understood a bit of it. The Begin() function of an effect has a provision to set a flag. The flag will decide whether to save the state info or not. Be careful about the default value "0" as it saves all the changes done in the effect file. There is provision for not saving the changes as well. Enjoy folks :-)
  13. KumGame

    State blocks in effect files

    Thanks circlesoft. I just wanted to know whether the state changes done within the 'stateblock' will be retained throughout the rendering process or not. Now I think it(state changes done within a stateblock) will be retained. Can anyone suggest me a good tutor on these? Thanks again
  14. KumGame

    Weird blending

    Thanks for replies.. I tried using some other image, it worked properly... So I think, the image itself was cheating me !!!
  15. Hi all.. I have a weird problem. I have 2 textures one of which has alpha channel. I want a transparent effect. so I enabled alpha testing and blending as follows. glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glEnable(GL_ALPHA_TEST); glAlphaFunc(GL_GREATER, 0.0); Unfortunately this doesn't give expected output. The texture without alpha channel is getting displayed properly but the one with alpha is not getting displayed. I have not enabled depth testing. I guess that there is some problem with blending not with alpha test as the alpha test is working fine if I disable blending Thanks..
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!