xray-16 icon indicating copy to clipboard operation
xray-16 copied to clipboard

OpenGL Renderer

Open Xottab-DUTY opened this issue 6 years ago • 10 comments

Post here all issues you have with OpenGL Renderer.

Current tasks and known bugs:

  • [x] Fix crash after second Device restart (type vid_restart several times in console to reproduce) (e9427ac939862e103e513a614ee1f9e7ae3c8df4)
  • [x] Fix bugs with dynamic lighting
    • [x] Fix bugs with local lights (lamps, campfires, etc) (06bb7657fad7d6578820cdfbf4aa7701ee732496, 615152e548a309d4dd4df3d7beb982f18af7bae5)
  • [x] Rewrite sun lighting calculation from D3DXMath (#463, intersects with #261)
  • [ ] Backend
    • [ ] Supported OpenGL versions:
      • [x] 4.5
      • [x] 4.1
      • [ ] 3.3
        • [x] Implement shader pipeline that can work without GL_ARB_separate_shader_objects (b0e4de824046f77b9de378ea5d6f3de4e53b22a4)
      • [ ] 3.1/3.0 maybe?
      • [ ] 2.2 maybe?
      • [ ] 2.0 maybe?
    • [ ] Implement OpenGL ES support
      • [ ] 3.x (make initial implementation for ES 3.x, if going straight to 2.0 isn't possible)
      • [ ] 2.0 (lower requirement to 2.0, if initial implementation was for 3.x)
    • [ ] Support for uniform buffer objects
    • [ ] Support MSAA
    • [ ] Support geometry shaders
    • [ ] Support compute shaders
    • [ ] Support tesselation shaders
  • [ ] Shaders ~~(two ways, should be supported both)~~
    • [ ] Use cross-compiler to compile shaders from DirectX renderer
      • Look into #258 for more info
    • [ ] ~~Implement all shaders in GLSL (shaders/gl folder)~~
      • [x] Implement vertex and fragment (pixel) shaders
        • [ ] Make implemented shaders work in all situations
          • [x] Fix boxy sky textures with enabled Vertex Texture Fetch (#537)
          • [x] Fix lighting glitches with G-buffer optimization enabled (r3_gbuffer_opt on)
          • [ ] Fix SSAO
          • [ ] Fix HBAO shader
      • [ ] ~~MSAA support~~
      • [ ] ~~Implement volumetric fog~~
      • [ ] ~~Implement HDAO Ultra (compute shaders)~~
      • [ ] ~~Implement tesselation~~

Xottab-DUTY avatar Nov 21 '18 11:11 Xottab-DUTY

Fix crash after second Device restart

Is this an OpenGL issue? I tried this in Wine and did not get a crash. Does it happen on Windows?

Zegeri avatar Nov 21 '18 17:11 Zegeri

Is this an OpenGL issue? I tried this in Wine and did not get a crash. Does it happen on Windows?

Yes. It reports about OpenGL buffer overflow when it's trying to draw triangles... As far as I remember. Can't do it again at the moment.

I tried this in Wine and did not get a crash.

The important thing: it doesn't crash after the first Device restart.

Xottab-DUTY avatar Nov 21 '18 17:11 Xottab-DUTY

if posible fix

! shader compilation failed ! dumb ! error: 0:1(10): error: GLSL 4.50 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

happend for all shader. maybe this reason of error

GL_INVALID_OPERATION in glUseProgramStages(program not linked) 76 FATAL ERROR [error] Expression : glUseProgramStages(HW.pPP, GL_FRAGMENT_SHADER_BIT, ps) [error] Function : set_PS [error] File : /home/test/build/game/xray-16/src/Layers/xrRenderPC_GL/../../Layers/xrRenderGL/glR_Backend_Runtime.h [error] Line : 80 [error] Description : (null)

radeon opensource driver

johndoe71rus avatar Nov 22 '18 07:11 johndoe71rus

Fix bugs with dynamic sun lighting

Sun lighting doesn't work correctly when r3_gbuffer_opt is enabled. I think we don't need this command for opengl renderer. It has many bugs and from it there is little use.

Btw, need to add info about incorrect msaa, cleaning textures after drawing, rewrite rain/sun calculating on linux, pixelation skybox textures, crash when open menu (Invalid video stream: 0x505)

SkyLoaderr avatar Nov 22 '18 10:11 SkyLoaderr

I suggest this task:

  • [x] Log OpenGL vendor and renderer

Zegeri avatar Nov 23 '18 17:11 Zegeri

Starting RENDER device...
Available video modes[0]:
[1920x1080]
* GPU vendor: [X.Org] device: [Radeon RX 550 Series (POLARIS12, DRM 3.27.0, 4.19.10-300.fc29.x86_64, LLVM 7.0.0)]
* GPU OpenGL version: 4.5 (Core Profile) Mesa 18.2.6
* GPU OpenGL shading language version: 4.50
* DVB created: 4096K
* DIB created: 512K
! Renderer doesn't support blender 'effects\shadow_world'

2018-12-30 21-11-27 Got it running with OpenGL renderer, started a new game. Is it how it is supposed to look now? Should I submit an issue about it being too dark or is it already submitted? Maybe I can tweak my settings for it to look better?

tpimh avatar Dec 30 '18 19:12 tpimh

" too dark" confirmed on Intel, nvidia and amd with the mesa. Ligth only nvidia blob

you can use light

johndoe71rus avatar Dec 30 '18 19:12 johndoe71rus

Are SSAO and HBAO shaders actually broken by now or is the task list (in the first comment) outdated? As far as I can see, some kind of ambient occlusion presents (looking at the rendered picture).

Lnd-stoL avatar Oct 22 '22 12:10 Lnd-stoL

SSAO works, but there's issue with SSAO on AMD cards, that's why it is in the task list too. HBAO shader compilation should be broken. HDAO... Not sure, may be broken too.

Update: Both HDAO and HBAO are disabled, because they are broken: https://github.com/OpenXRay/xray-16/blob/dev/src/Layers/xrRender_R2/r2.cpp#L469

Xottab-DUTY avatar Oct 22 '22 12:10 Xottab-DUTY