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_collapse_fragment_shader.glsl
29 29
//////////////////////////////////////////////////////////////////////////////////////////////
30 30
// per-pixel linked list. Order Independent Transparency.
31 31

  
32
uniform vec2 u_Size;
32
uniform uvec2 u_Size;
33 33

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

  
43 43
void main()                    		
44 44
  {
45
  uint prev = uint(v_Pixel.x + v_Pixel.y * u_Size.x);
45
  uint prev = uint(v_Pixel.x) + uint(v_Pixel.y) * u_Size.x;
46 46
  uint curr = u_Records[prev];
47 47

  
48 48
  if (curr != 0u)

Also available in: Unified diff