Jump to content
  • Advertisement

CastorX1987

Member
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

118 Neutral

About CastorX1987

  • Rank
    Newbie
  1. CastorX1987

    Shadow Mapping not working -nVIDIA/AMD-

    I've just tried textureGather(sampler2DShadow, ...) and NOW IT WORKS! But it does not do linear filtering. So -I know it is not correct, but it was just for debug- this WORKS vec4 XYZ = textureGather(texLZ, fragTexSpot.xy, fragTexSpot.z - 0.0001); outDiff = vec4(1, 1, 1, 1) * XYZ.x; This DOES NOT work: float Factor = texture(texLZ, vec3(fragTexSpot.xy, fragTexSpot.z - 0.0003)) // Tried this too... makes no difference float Factor = texture(texLZ, fragTexSpot.xy, 0.0003) And I can even set the GL_TEXTURE_COMPARE_FUNC to ALWAYS or NEVER, it makes no difference... with textureGather booth work.
  2. CastorX1987

    Shadow Mapping not working -nVIDIA/AMD-

    It looks like the GL_TEXTURE_COMPARE_MODE is just inoperable. GL_TEXTURE_MIN_FILTER is working, and so on... excpet this one and only on my radeon. I have also changed to sampler objects, but the results are the same. What did I forget?
  3. Hello eveyone! I have implemented shadow mapping in my program. It works perfectly on nVIDIA and AMD GPU too when I use GL_TEXTURE_COMPARE_MODE, GL_NONE GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL and uniform sampler2D texLZ; // Light Z-Depth And of course depth comparison in the pixel shader.     But when I tried to set: GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE GL_TEXTURE_COMPARE_FUNC, GL_LEQUAL and used uniform sampler2DShadow texLZ; // Light Z-Depth And of couse an other shader code to do the shading: float Factor = texture(texLZ, vec3(fragTexSpot.xy, fragTexSpot.z - 0.0003)) * 0.75; outDiff = vec4(Factor,Factor,Factor,1); It did not work anymore with my AMD card (Radeon HD7750), and worked without any errors on my nVIDIA.   Could someone please help me because now I'm really confused.    I have even debugged my FBO and FBO depth texture with AMD CodeXL. The Texture properties are: Texture 16 ? General Type 2D Texture # of Mipmaps 1 Level(s) Dimensions 256x256 Border Width 0px Internal Pixel Format RequestedGL_DEPTH_COMPONENT32 Used GL_DEPTH_COMPONENT32 Pixel Format Format GL_DEPTH_COMPONENT Type GL_FLOAT Texture Parameters Name Value GL_TEXTURE_MIN_FILTER GL_LINEAR GL_TEXTURE_MAG_FILTER GL_LINEAR GL_TEXTURE_WRAP_S GL_CLAMP GL_TEXTURE_WRAP_T GL_CLAMP GL_TEXTURE_WRAP_R GL_REPEAT GL_TEXTURE_MIN_LOD -1000 GL_TEXTURE_MAX_LOD 1000 GL_TEXTURE_BASE_LEVEL 0 GL_TEXTURE_MAX_LEVEL 1000 GL_GENERATE_MIPMAP N/A GL_TEXTURE_PRIORITY N/A GL_TEXTURE_BORDER_COLOR 0 GL_TEXTURE_RESIDENT TRUE GL_TEXTURE_COMPARE_MODE GL_COMPARE_R_TO_TEXTURE GL_TEXTURE_COMPARE_FUNC GL_LEQUAL GL_DEPTH_TEXTURE_MODE N/A Level 0 Parameters Name Value GL_TEXTURE_WIDTH 256 GL_TEXTURE_HEIGHT 256 GL_TEXTURE_DEPTH 1 GL_TEXTURE_INTERNAL_FORMAT GL_DEPTH_COMPONENT32 GL_TEXTURE_BORDER N/A GL_TEXTURE_RED_SIZE 0 GL_TEXTURE_GREEN_SIZE 0 GL_TEXTURE_BLUE_SIZE 0 GL_TEXTURE_ALPHA_SIZE 0 GL_TEXTURE_LUMINANCE_SIZE 0 GL_TEXTURE_INTENSITY_SIZE 0 GL_TEXTURE_DEPTH_SIZE 32 GL_TEXTURE_SHARED_SIZE 0 GL_TEXTURE_STENCIL_SIZE 0 GL_TEXTURE_COMPRESSED FALSE GL_TEXTURE_COMPRESSED_IMAGE_SIZE N/A GL_TEXTURE_RED_TYPE 0 GL_TEXTURE_GREEN_TYPE 0 GL_TEXTURE_BLUE_TYPE 0 GL_TEXTURE_ALPHA_TYPE 0 GL_TEXTURE_DEPTH_TYPE 35863 GL_TEXTURE_SAMPLES 0 GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 1 OpenGL Init: glutInit(&argc, argv); glutInitContextVersion(4, 2); glutInitContextFlags(GLUT_FORWARD_COMPATIBLE | GLUT_DEBUG); glutInitDisplayMode(GLUT_DOUBLE); glutInitWindowSize(RES_W, RES_H); glutCreateWindow("OpenGL"); glutDisplayFunc(Render); glewExperimental = GL_TRUE; if (glewInit() != GLEW_OK) { assert(false); } glGetError(); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); glDebugMessageCallback(openglCallbackFunction, nullptr); GLuint unusedIds = 0; glDebugMessageControl(GL_DONT_CARE,GL_DONT_CARE,GL_DONT_CARE,0,&unusedIds,true); Again: With nVIDIA it works, with AMD it does not work (I have no shadow). I also tried to set the GL_TEXTURE_COMPARE_FUNC to GL_NEVER and GL_ALWAYS, but nothing changed on my AMD card setup. It looks like it does not even use the GL_COMPARE_R_TO_TEXTURE. But then why is it working with NVIDIA and not working with AMD? Why can I see the correct properties in CodeXL? WHy did the GL_ALWAYS/NEVER not work? I have also tried to enable debug output, but I get no output, except when I use the built-in Intel GPU in my laptop, the I have seen some messages (shader errors, which were also reported in the shader compilation log, but only with the intel driver... I've fixed them of course). The program did not work with my Intel GPU since I'm using DirectStateAccess, and the Intel driver does not support it. Now I'm really confused. What am I doing wrong? Any advise vould be helpful.   Thank you in advance.
  4. CastorX1987

    Bullet Physics Release vs Debug

    You were right Aardvajk. Ive just tried it with /RTCsu and Optimization Disable and it lloks like the /RTCsu helped, so it an init problem. Many thanks!
  5. CastorX1987

    Bullet Physics Release vs Debug

    Can be but I did not find a solution yet. If I use this:   compoundShape->addChildShape(btTransform(btQuaternion(0,0,0,1), btVector3(0, 0, 0)), currShape); ... model->BtCollisionShape = compoundShape; // Use the compound shape as collision shape of our model   the the problem is present in release mode.       However if I use this: retMod->BtCollisionShape = currShape; // Use the base shape directly as collision object (Sphere, Box, Trimesh)   It works in release mode too.
  6. CastorX1987

    Bullet Physics Release vs Debug

    I wanted to create a simple physics demo using compound shapes. The ground is a static compound shape with one child Triangle mesh. The secene has spheres and cubes, every one is a combined shape with one child shape (box or sphere). Now the simulation: - Before starting the simulation I add the ground and cubes to the scene. - Later I shoot spheres into the scene The speheres collide with the ground BUT DO NOT COLLIDE NOT WITH THE cubes... and this problem appears ONLY in release mode. In debug mode everyting is fine. It is also all right when I add a few speheres before starting the simulation. Did anyone faced the same problem before? Any suggestions? (There is definately no difference in my source code between the release and the debug mode compilation.) Thank you in advance!
  • 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!