Project

General

Profile

« Previous | Next » 

Revision 344ac0e4

Added by Leszek Koltunski almost 6 years ago

OIT: fix for 'out of memory' crash on Mali GPUs.

~The thing still does not fully work there - there are still strange flashes in apps that innvolve OIT, for example in 'Triblur'.

View differences:

src/main/res/raw/oit_render_fragment_shader.glsl
27 27
//////////////////////////////////////////////////////////////////////////////////////////////
28 28
// per-pixel linked list. Order Independent Transparency.
29 29

  
30
uniform vec2 u_Size;
30
uniform uvec2 u_Size;
31 31

  
32 32
layout (std430,binding=1) buffer linkedlist  // first (u_Size.x*u_Size.y) uints - head pointers,
33 33
  {                                          // one for each pixel in the Output rectangle.
......
59 59

  
60 60
void main()                    		
61 61
  {
62
  uint prev = uint(v_Pixel.x + v_Pixel.y * u_Size.x);
62
  uint prev = uint(v_Pixel.x) + uint(v_Pixel.y) * u_Size.x;
63 63
  uint curr = u_Records[prev];
64 64

  
65 65
  if (curr != 0u)

Also available in: Unified diff