[2.2] Problem with point light shadows in OpenGL.

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
przemir
Halfling
Posts: 68
Joined: Sun May 11, 2014 7:55 pm
Location: Poland
x 21

[2.2] Problem with point light shadows in OpenGL.

Post by przemir »

Hi,

Point light shadows don't work on OpenGL. They work on DirectX.
Sample to reproduce error: modify Forward3D Sample:

1. In Forward3DGameState::createScene01 comment all lights: directional, 2 spotlights and ambient (ambient is optional, but it uses method from 'Ogre::Light *light' variable which was already commented).
2. In Forward3DGameState::generateLights comment line 'light->setCastShadows( false );'
3. Build, run.
4. Set number of lights to 1.
5. Find this light (somewhere in front of us).
6. Increase radius.

I am using Ogre 2.2.2, Windows 10.

DirectX settings:

Code: Select all

09:14:36: -------------------------
09:14:36:  *   CPU ID: GenuineIntel: Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
09:14:36:  *   Logical cores: 8
09:14:36:  *      SSE: yes
09:14:36:  *     SSE2: yes
09:14:36:  *     SSE3: yes
09:14:36:  *      MMX: yes
09:14:36:  *   MMXEXT: yes
09:14:36:  *    3DNOW: no
09:14:36:  * 3DNOWEXT: no
09:14:36:  *     CMOV: yes
09:14:36:  *      TSC: yes
09:14:36:  *      FPU: yes
09:14:36:  *      PRO: yes
09:14:36:  *       HT: no
09:14:36: -------------------------
09:14:36: D3D11: Subsystem Initialising
09:14:36: D3D11: Driver Detection Starts
09:14:36: D3D11: "Intel(R) HD Graphics 630"
09:14:36: D3D11: "NVIDIA GeForce GTX 1050 Ti"
09:14:36: D3D11: "Microsoft Basic Render Driver (software)"
09:14:36: D3D11: Driver Detection Ends
09:14:36: D3D11: Requested "(default)", selected "Intel(R) HD Graphics 630"
09:14:36: ***************************************
09:14:36: *** D3D11: Subsystem Initialized OK ***
09:14:36: ***************************************
09:14:37: D3D11RenderSystem::_createRenderWindow "Forward+ Lights", 1920x1080 fullscreen  miscParams: FSAA=1x MSAA externalWindowHandle=2557742 gamma=Yes reverse_depth=Yes title=Forward+ Lights vsync=No 
09:14:37: Registering ResourceManager for type GpuProgram
09:14:37: RenderSystem capabilities
09:14:37: -------------------------
09:14:37: RenderSystem Name: Direct3D11 Rendering Subsystem
09:14:37: GPU Vendor: intel
09:14:37: Device Name: Intel(R) HD Graphics 630
09:14:37: Driver Version: 26.20.100.7263
09:14:37:  * Fixed function pipeline: no
09:14:37:  * Hardware generation of mipmaps: yes
09:14:37:  * Texture blending: yes
09:14:37:  * Anisotropic texture filtering: yes
09:14:37:  * Dot product texture operation: yes
09:14:37:  * Cube mapping: yes
09:14:37:  * Hardware stencil buffer: yes
09:14:37:    - Stencil depth: 8
09:14:37:    - Two sided stencil support: yes
09:14:37:    - Wrap stencil values: yes
09:14:37:  * Hardware vertex / index buffers: yes
09:14:37:  * 32-bit index buffers: yes
09:14:37:  * Vertex programs: yes
09:14:37:  * Number of floating-point constants for vertex programs: 512
09:14:37:  * Number of integer constants for vertex programs: 16
09:14:37:  * Number of boolean constants for vertex programs: 16
09:14:37:  * Fragment programs: yes
09:14:37:  * Number of floating-point constants for fragment programs: 512
09:14:37:  * Number of integer constants for fragment programs: 16
09:14:37:  * Number of boolean constants for fragment programs: 16
09:14:37:  * Geometry programs: yes
09:14:37:  * Number of floating-point constants for geometry programs: 512
09:14:37:  * Number of integer constants for geometry programs: 16
09:14:37:  * Number of boolean constants for geometry programs: 16
09:14:37:  * Tessellation Hull programs: yes
09:14:37:  * Number of floating-point constants for tessellation hull programs: 512
09:14:37:  * Number of integer constants for tessellation hull programs: 16
09:14:37:  * Number of boolean constants for tessellation hull programs: 16
09:14:37:  * Tessellation Domain programs: yes
09:14:37:  * Number of floating-point constants for tessellation domain programs: 512
09:14:37:  * Number of integer constants for tessellation domain programs: 16
09:14:37:  * Number of boolean constants for tessellation domain programs: 16
09:14:37:  * Compute programs: yes
09:14:37:  * Number of floating-point constants for compute programs: 512
09:14:37:  * Number of integer constants for compute programs: 16
09:14:37:  * Number of boolean constants for compute programs: 16
09:14:37:  * Supported Shader Profiles: cs_5_0 ds_5_0 gs_4_0 gs_4_1 gs_5_0 hlsl hs_5_0 ps_4_0 ps_4_0_level_9_1 ps_4_0_level_9_3 ps_4_1 ps_5_0 vs_4_0 vs_4_0_level_9_1 vs_4_0_level_9_3 vs_4_1 vs_5_0
09:14:37:  * Texture Compression: yes
09:14:37:    - DXT: yes
09:14:37:    - VTC: no
09:14:37:    - PVRTC: no
09:14:37:    - ATC: no
09:14:37:    - ETC1: no
09:14:37:    - ETC2: no
09:14:37:    - BC4/BC5: yes
09:14:37:    - BC6H/BC7: yes
09:14:37:    - ASTC: no
09:14:37:  * Hardware Occlusion Query: yes
09:14:37:  * User clip planes: yes
09:14:37:  * VET_UBYTE4 vertex element type: yes
09:14:37:  * Infinite far plane projection: yes
09:14:37:  * Hardware render-to-texture: yes
09:14:37:  * Floating point textures: yes
09:14:37:  * Non-power-of-two textures: yes
09:14:37:  * 1d textures: yes
09:14:37:  * Volume textures: yes
09:14:37:  * Max Texture resolution (2D) 16384
09:14:37:  * Max Texture resolution (3D) 2048
09:14:37:  * Max Texture resolution (Cubemaps) 16384
09:14:37:  * Multiple Render Targets: 8
09:14:37:    - With different bit depths: yes
09:14:37:  * Point Sprites: yes
09:14:37:  * Extended point parameters: yes
09:14:37:  * Max Point Size: 256
09:14:37:  * Vertex texture fetch: yes
09:14:37:  * Number of world matrices: 0
09:14:37:  * Number of texture units: 16
09:14:37:  * Stencil buffer depth: 8
09:14:37:  * Number of vertex blend matrices: 0
09:14:37:    - Max vertex textures: 4
09:14:37:    - Vertex textures shared: no
09:14:37:  * Render to Vertex Buffer : yes
09:14:37:  * Hardware Atomic Counters: no
09:14:37:  * Compute max threads per threadgroup per axis: 1024, 1024, 64
09:14:37:  * Compute max threads per threadgroup total: 1024
09:14:37:  * Using Reverse Z: yes
OpenGL settings:

Code: Select all

09:12:30: **************************************
09:12:30: ***   OpenGL 3+ Renderer Started   ***
09:12:30: **************************************
09:12:30: Registering ResourceManager for type GpuProgram
09:12:30: RenderSystem capabilities
09:12:30: -------------------------
09:12:30: RenderSystem Name: OpenGL 3+ Rendering Subsystem
09:12:30: GPU Vendor: intel
09:12:30: Device Name: Intel(R) HD Graphics 630
09:12:30: Driver Version: 4.5.0.0
09:12:30:  * Fixed function pipeline: no
09:12:30:  * Hardware generation of mipmaps: no
09:12:30:  * Texture blending: yes
09:12:30:  * Anisotropic texture filtering: yes
09:12:30:  * Dot product texture operation: yes
09:12:30:  * Cube mapping: yes
09:12:30:  * Hardware stencil buffer: yes
09:12:30:    - Stencil depth: 8
09:12:30:    - Two sided stencil support: yes
09:12:30:    - Wrap stencil values: yes
09:12:30:  * Hardware vertex / index buffers: yes
09:12:30:  * 32-bit index buffers: yes
09:12:30:  * Vertex programs: yes
09:12:30:  * Number of floating-point constants for vertex programs: 4096
09:12:30:  * Number of integer constants for vertex programs: 4096
09:12:30:  * Number of boolean constants for vertex programs: 4096
09:12:30:  * Fragment programs: yes
09:12:30:  * Number of floating-point constants for fragment programs: 4096
09:12:30:  * Number of integer constants for fragment programs: 4096
09:12:30:  * Number of boolean constants for fragment programs: 4096
09:12:30:  * Geometry programs: yes
09:12:30:  * Number of floating-point constants for geometry programs: 4096
09:12:30:  * Number of integer constants for geometry programs: 4096
09:12:30:  * Number of boolean constants for geometry programs: 4096
09:12:30:  * Tessellation Hull programs: yes
09:12:30:  * Number of floating-point constants for tessellation hull programs: 4096
09:12:30:  * Number of integer constants for tessellation hull programs: 4096
09:12:30:  * Number of boolean constants for tessellation hull programs: 4096
09:12:30:  * Tessellation Domain programs: yes
09:12:30:  * Number of floating-point constants for tessellation domain programs: 4096
09:12:30:  * Number of integer constants for tessellation domain programs: 4096
09:12:30:  * Number of boolean constants for tessellation domain programs: 4096
09:12:30:  * Compute programs: yes
09:12:30:  * Number of floating-point constants for compute programs: 4096
09:12:30:  * Number of integer constants for compute programs: 4096
09:12:30:  * Number of boolean constants for compute programs: 4096
09:12:30:  * Supported Shader Profiles: glsl glsl130 glsl140 glsl150 glsl330 glsl400 glsl410 glsl420 glsl430 glsl440
09:12:30:  * Texture Compression: yes
09:12:30:    - DXT: yes
09:12:30:    - VTC: no
09:12:30:    - PVRTC: no
09:12:30:    - ATC: no
09:12:30:    - ETC1: no
09:12:30:    - ETC2: yes
09:12:30:    - BC4/BC5: yes
09:12:30:    - BC6H/BC7: yes
09:12:30:    - ASTC: yes
09:12:30:  * Hardware Occlusion Query: yes
09:12:30:  * User clip planes: yes
09:12:30:  * VET_UBYTE4 vertex element type: yes
09:12:30:  * Infinite far plane projection: yes
09:12:30:  * Hardware render-to-texture: yes
09:12:30:  * Floating point textures: yes
09:12:30:  * Non-power-of-two textures: yes
09:12:30:  * 1d textures: yes
09:12:30:  * Volume textures: yes
09:12:30:  * Max Texture resolution (2D) 16384
09:12:30:  * Max Texture resolution (3D) 2048
09:12:30:  * Max Texture resolution (Cubemaps) 16384
09:12:30:  * Multiple Render Targets: 8
09:12:30:    - With different bit depths: yes
09:12:30:  * Point Sprites: yes
09:12:30:  * Extended point parameters: yes
09:12:30:  * Max Point Size: 255
09:12:30:  * Vertex texture fetch: yes
09:12:30:  * Number of world matrices: 0
09:12:30:  * Number of texture units: 16
09:12:30:  * Stencil buffer depth: 8
09:12:30:  * Number of vertex blend matrices: 0
09:12:30:    - Max vertex textures: 32
09:12:30:    - Vertex textures shared: yes
09:12:30:  * Render to Vertex Buffer : yes
09:12:30:  * Hardware Atomic Counters: yes
09:12:30:  * Compute max threads per threadgroup per axis: 1024, 1024, 64
09:12:30:  * Compute max threads per threadgroup total: 1024
09:12:30:  * GL 1.5 without VBO workaround: no
09:12:30:  * Frame Buffer objects: yes
09:12:30:  * Frame Buffer objects (ARB extension): no
09:12:30:  * Frame Buffer objects (ATI extension): no
09:12:30:  * PBuffer support: no
09:12:30:  * GL 1.5 without HW-occlusion workaround: no
09:12:30:  * Vertex Array Objects: yes
09:12:30:  * Separate shader objects: no
09:12:30:  * Using Reverse Z: yes
przemir
Halfling
Posts: 68
Joined: Sun May 11, 2014 7:55 pm
Location: Poland
x 21

Re: [2.2] Problem with point light shadows in OpenGL.

Post by przemir »

I updated 2.2 branch to check if error still occurs and there is the same behaviour. However, it turned out problem only occurs for OpenGL and only for "Intel(R) HD Graphics 630" graphics card. NVidia card worked just fine.
Post Reply