User Tag List

Results 1 to 10 of 10

Thread: Pixel Shaders

  1. #1
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Pixel Shaders

    Hello. I just wanted to know what's going on.. pixel shaders newer than 2.0 don't seem to work, mostly. I made a 3.0 one, and it worked, then I changed 1 thing and it didn't work anymore: The whole texture is filled with the very first pixel. (=> Standard active = invisible)

    The shader works fine in AMD rendermonkey, though - and it works for MechaBowser.

    My card is a 6000 GT, which has PS 3.0, I've also tried it on a 8800 GT - Nothing.

    Yves?

  2. #2
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Pixel Shaders

    Hmm... no idea... Could you post the .fx file?

  3. #3
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Pixel Shaders

    I don't see a reason why, this doesn't even work:
    Out.Color = float4(1.0,1.0,In.Texture.x,1.0);

    It would display a plain rgb(1,1,0) since In.Texture.x is 0 for the first pixel. anyway:
    Code:
    // Pixel shader input structure
    struct PS_INPUT
    {
        float4 Position   : POSITION;
        float2 Texture    : TEXCOORD0;
    };
    
    // Pixel shader output structure
    struct PS_OUTPUT
    {
        float4 Color   : COLOR0;
    };
    
    // Global variables
    sampler2D Texture0;
    float fCoeff;
    float fAngle;
    int   iSteps;
    #define _FACTOR (i/float(iSteps))
    
    PS_OUTPUT ps_main( in PS_INPUT In )
    {
      PS_OUTPUT Out;
      float4 OutA;
      float4 OutB;
       int i = 0;
       fAngle *= 0.0174532925f;
    
       Out.Color = tex2D(Texture0, In.Texture.xy);
       
       if(iSteps>0) {
    			while(i<iSteps) {
    				OutA = tex2D(Texture0, float2(In.Texture.x+cos(fAngle)*fCoeff*_FACTOR,In.Texture.y+sin(fAngle)*fCoeff*_FACTOR));
    				OutB = tex2D(Texture0, float2(In.Texture.x-cos(fAngle)*fCoeff*_FACTOR,In.Texture.y-sin(fAngle)*fCoeff*_FACTOR));
    				Out.Color += OutA+OutB;
    				i++;
    		 }
    		 Out.Color /= iSteps*2+1;
      }
       
      return Out;
    }
    
    // Effect technique
    technique tech_main
    {
        pass P0
        {
            // shaders
            VertexShader = NULL;
            PixelShader  = compile ps_3_0 ps_main();
        }  
    }

  4. #4
    Clicker Multimedia Fusion 2 Developer

    Join Date
    Jul 2006
    Location
    Denmark
    Posts
    1,812
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pixel Shaders

    works in a GeForce 9800 GTX2+

  5. #5
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Pixel Shaders

    Doesn't work on my card either (it's older but it theoretically supports shaders version 3). I'm looking at the problem.

  6. #6
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Pixel Shaders

    Great. Thanks
    The first cards that supported PS 3.0:
    Radeon R520 (X1300-X1950)
    Intel GMA X3000
    GeForce 6 series

    BTW, have you set the 3 parameters?

  7. #7
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pixel Shaders

    i get this so i'm assuming it's supposed to look like this? (iirc the parameters were set as .04, 30, and 32 for this one)

    DX9/card driver issues for you, maybe?


  8. #8
    Clicker Fusion 2.5 DeveloperSWF Export ModuleUnicode Add-on
    Looki's Avatar
    Join Date
    Aug 2006
    Location
    Karlsruhe, Germany
    Posts
    3,739
    Mentioned
    4 Post(s)
    Tagged
    1 Thread(s)

    Re: Pixel Shaders

    Yeah, it's supposed to look like that
    No.. it doesn't work for many, many people. Also, the shader works fine in Rendermonkey, it's MMF.

  9. #9
    Clickteam Clickteam

    Join Date
    Jun 2006
    Location
    France
    Posts
    13,076
    Mentioned
    119 Post(s)
    Tagged
    2 Thread(s)

    Re: Pixel Shaders

    Yes, that's weird, if it's MMF it wouldn't work on any card. So it's odd it works on some of them. At the moment I don't see what to do to make it to work. I'll look again into this problem when the next beta version will be released (should be very soon, more info next week).

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLC
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)iOS Export Module (Steam)

    Join Date
    Jul 2008
    Location
    The U of K.
    Posts
    126
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Pixel Shaders

    Excellent news!

Similar Threads

  1. Pixel Shaders examples
    By Sphax in forum Hardware Accelerated Runtime
    Replies: 116
    Last Post: 15th October 2016, 07:09 PM
  2. Pixel Shaders 3.0?
    By Algul in forum Hardware Accelerated Runtime
    Replies: 1
    Last Post: 11th January 2012, 12:02 PM
  3. How to get Sphax's Pixel Shaders into TGF2?
    By RayMarble in forum Hardware Accelerated Runtime
    Replies: 3
    Last Post: 2nd August 2010, 10:32 AM
  4. Pixel Shaders Ideas/Requests - HWA
    By Novabrain in forum Hardware Accelerated Runtime
    Replies: 77
    Last Post: 2nd June 2009, 12:45 PM
  5. Load External Pixel shaders
    By MechatheSlag in forum Hardware Accelerated Runtime
    Replies: 5
    Last Post: 8th January 2009, 07:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •