Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: cannot locate suitable resource to bind parameter

  1. #1
    Advanced Member Frequent Contributor Ehsan Kamrani's Avatar
    Join Date
    May 2005
    Posts
    537

    cannot locate suitable resource to bind parameter

    Hi,
    I'm implementing deferred lighting. My models contain several texture layers including:
    Diffuse
    Alpha Map
    Gloss Map
    Specular Map
    Dirt Map
    Shadow Map

    So I should render these layers to 8 color buffers using FBO:
    Position
    Normal
    Diffuse
    Normal Map
    Alpha Map
    Specular Map
    Dirt Map
    Shadow Map

    I also need to output the scene to another buffer. So I need 9 out qualifiers.
    My old graphics card (Geforce 9600) supports 8 out qualifiers. So if I try to output another out qualifier, I get this error:

    error C5041: cannot locate suitable resource to bind parameter "myVec48"

    How can I solve this problem?
    Bests

  2. #2
    Advanced Member Frequent Contributor Ehsan Kamrani's Avatar
    Join Date
    May 2005
    Posts
    537
    Well looks like I can use one draw buffer to render all of the textures. Am I correct? For example:
    myVec43 = vec4((diffuseColor.xyz + GlossColor.xyz ) * 0.5, 0.0);
    In order to blend diffuse and gloss colors.

  3. #3
    Junior Member Regular Contributor Agent D's Avatar
    Join Date
    Sep 2011
    Location
    Innsbruck, Austria
    Posts
    153
    First of all, you don't need to write a position buffer. You can restore the view space position from the fragment xy position and the value from the depth buffer.

    Second of all, what is the difference between "normal" and "normal map"? Normal mapped materials can simply write the perturbed normal to the G-Buffer instead.

    Third, you don't use a shadow map for your G-Buffer pass. One big advantage of deferred lighing is the fact that objects don't need to know anything about light or
    shadow caclulations. During the light pass you can generate a shadow map for the light you are currently rendering and use that. No need for per-light shadow maps
    during the G-Buffer pass.

Tags for this Thread

Posting Permissions

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