Skip to content
Permalink
Browse files

[opencl] Global transparency

  • Loading branch information
elpaso committed Aug 8, 2018
1 parent 5129dcf commit 3161b9407dc53970d9e605bcd7d5145328ccd4b6
Showing with 6 additions and 3 deletions.
  1. +6 −3 resources/opencl_programs/hillshade.cl
@@ -6,7 +6,7 @@ __kernel void processNineCellWindow( __global float *scanLine1,
__global float *scanLine3,
__global uchar4 *resultLine, // This is an image BGRA !
__global float *rasterParams // [ mInputNodataValue, mOutputNodataValue, mZFactor, mCellSizeX, mCellSizeY,
// azimuthRad, cosZenithRad, sinZenithRad ]
// azimuthRad, cosZenithRad, sinZenithRad, mOpacity ]

) {

@@ -31,7 +31,7 @@ __kernel void processNineCellWindow( __global float *scanLine1,
float res;
if ( derX == rasterParams[1] || derY == rasterParams[1] )
{
res = rasterParams[1];
res = 255.0f;
}
else
{
@@ -49,6 +49,9 @@ __kernel void processNineCellWindow( __global float *scanLine1,

}

resultLine[i] = (uchar4)(res, res, res, 255);
// Opacity
res = res * rasterParams[7];

resultLine[i] = (uchar4)(res, res, res, 255 * rasterParams[7]);

}

0 comments on commit 3161b94

Please sign in to comment.
You can’t perform that action at this time.