Jump to content

wh1sp3r

Members
  • Posts

    421
  • Joined

  • Last visited

Posts posted by wh1sp3r

  1. i have Vignetting shader done, it's really easy

     

    but i have problem with Bookeh effect, because i don't know, how to detect hightlights :)

    when skybox is on scene :) it has usually same colour as hightlights of other objects in scene :) but there are no bookeh effect on the sky :) so .. my question is simple, how to detect right hightlights ?

  2. when you have a scene with lots of objects with lots of textures .. i think It's better to make one big texture, which contain 4 textures, becuase Binding texture is not so fast :) and it can make a big difference in large scene.

  3. Another example:

     

    i designed a negative effect in Photoshop .. and ?? effect is in LE too !! :D

     

    So, this is image from Photoshop, i designed a negative colours and i exported gradient map into engine.

    post-13-12705826698166_thumb.jpg

     

    and this is result:

    post-13-12705826844435_thumb.jpg

     

    Now, blending is working too :) so coloring can change dynamicly, when you enter into different location in a game, or into building, or if weather is changing, whatever :)

  4. so, i attached two images, first is without filter, second is with filter.

     

    It's from engine :)

     

    good thing is, you can use all layer settings to set scene as you need like highlights shadow, color balance, hue, saturation, brightness, whatever you need, you only export a gradient map for shader, that's all. You can replace all colours, if you want, lol.

     

    post-13-12705729723367_thumb.jpg

    post-13-12705730075033_thumb.jpg

  5. ok . i have my post-shader done

    i will send it there, you can make screenshot of your game, load in into photoshop, edit colours as you wish, save gradient map of colours .. whoalaa ;-) Your scene is realisticaly coloured ! and It's fast.

     

     

    There is no need for contract/saturate/light shader .. because this can do everything :) You can tune everything with photoshop colour curves.

     

    preparing demo....

  6. Hi, i'd like to ask, how to pass a texture to the shader ?

     

     

    C++ code:

    	world = CreateWorld() ;	
    gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR|BUFFER_DEPTH|BUFFER_NORMAL);
    TBuffer postbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_COLOR);
    
    camera=CreateCamera();PositionEntity(camera,Vec3(0,0,-2));
    
    material=LoadMaterial("abstract::cobblestones.mat");
    mesh=CreateCube();
    PaintEntity(mesh,material);
    
    light=CreateDirectionalLight();
    RotateEntity(light,Vec3(45,45,45));
       TShader postfilter;
    
    postfilter=LoadShader("abstract::postfilter.vert","abstract::palette.frag");
    TTexture palette = LoadTexture("abstract::palette.dds");
    
    while( !KeyHit() && !AppTerminate() )
    {
    		TurnEntity( mesh, Vec3( 0.5f*AppSpeed() ) ) ;
    		UpdateAppTime();
    		UpdateWorld(AppSpeed()) ;	
    
    		SetBuffer(gbuffer);
    		RenderWorld();			
    		SetBuffer(postbuffer);
    		RenderLights(gbuffer);
    
    		SetBuffer(BackBuffer());           
    
    		BindTexture( palette , 1 );
    		SetShader(postfilter);			
    		DrawImage(GetColorBuffer(postbuffer),0,0,GraphicsWidth(),GraphicsHeight()); 
    		SetShader(0);
    
    
    		DrawText(0,0, "%f", FPS());
    		Flip(0) ;
    }
    return Terminate() ;
    }

     

    Shader code:

    uniform sampler2D Texture0;
    uniform sampler2D Texture1;
    
    void main()
    {
      vec4 ncolor = vec4(1,0,0,1);
      float colour_distance_nearest = 200000.0;
      float pixelx = 1.0 / 32.0;
      float pixely = 1.0 / 32.0;
    
      vec4 color = texture2D( Texture0, gl_FragCoord.xy);
    
      ...
    
    
      my super top secret code 
    
      ...
    
      gl_FragColor = ncolor;
    }
    

     

    i tested shader in rendermonkey and It's working fine :)

    i just want to know, how to pass a second texture, this shows me a black screen :(

     

    thank you

  7. i remember .. i had strange problems too with character long ago .. collision was ... strange, slow .. hard to explain, i rewrote my demo application .. and since this, i have not experienced any similar problem anymore, so, It's strange B)

×
×
  • Create New...