Jump to content
  • Advertisement

kalle_h

Member
  • Content Count

    410
  • Joined

  • Last visited

Community Reputation

2469 Excellent

About kalle_h

  • Rank
    Member

Personal Information

  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. kalle_h

    Performance: Fastest quad drawing

    Starting from page 15.
  2. kalle_h

    Weird lighting when translating object

    General case is not same as optimized case. Not transforming normal(but light instead) only work if you are using forward rendering and have very small amount of lights and don't sample from any cubemaps. This is very special case which is not all that common nowadays. Also this adds extra cpu usage per draw call. You also need to send this data per draw call. In otherhand couple ALU's at vertex shader is rarely bottleneck.
  3. kalle_h

    Weird lighting when translating object

    You cannot always do that. Example enviroment cubemap, you need world space normal/reflection vector to sample it. For general case you usually need transformed world space normal. Also it's lot cheaper to transform single normal than multiple lights.
  4. kalle_h

    Weird lighting when translating object

    Normal should be vec3 and not vec4. You propably have 1.0f as implicit value in w channel in input normal. Then you are also normalize resulting vec4 which is incorrect. So change v_normal to vec3. Try something like that: v_normal = (normal_Matrix * vec4(n_normal.xyz, 0.0)).xyz; And do not normalize that before pixel shader stage.
  5. kalle_h

    Specular highlight on a 2D shape

    You allready did get answer how to fake it. Use normal map. You can simplify the process becouse you don't need to care about tangent space or such. Just use object space normal map and transform lights to object space and done.
  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!