Skip to content

Commit 44a2269

Browse files
committedAug 8, 2019
edit
1 parent 0e7478c commit 44a2269

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
 

‎hydra_app/input.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Input::Input()
1616
//inLibraryPath = "tests/test_224_sphere";
1717
//inLibraryPath = "tests/test_224_sphere_microfacet";
1818
//inLibraryPath = "tests/test_pool";
19-
//inLibraryPath = "/home/frol/PROG/CLSP_gitlab/database/temp";
19+
//inLibraryPath = "C:/[Hydra]/pluginFiles/scenelib/";
2020

21-
inDevelopment = true; ///< recompile shaders each time; note that nvidia have their own shader cache!
21+
inDevelopment = false; ///< recompile shaders each time; note that nvidia have their own shader cache!
2222
inDeviceId = 0; ///< opencl device id
2323
cpuFB = true; ///< store frame buffer on CPU. Automaticly enabled if
2424
enableMLT = false; ///< if use MMLT, you MUST enable it early, when render process just started (here or via command line).

‎hydra_drv/clight.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,14 @@ static inline float3 skyLightGetIntensityTexturedENV(__global const PlainLight*
306306
return envColor*texColor;
307307
}
308308

309-
static inline float evalMap2DPdf(const float2 texCoordT, __global const float* intervals, const int sizeX, const int sizeY)
309+
static inline float evalMap2DPdf(float2 texCoordT, __global const float* intervals, const int sizeX, const int sizeY)
310310
{
311311
const float fw = (float)sizeX;
312312
const float fh = (float)sizeY;
313313

314+
if (texCoordT.x < 0.0f || texCoordT.x > 1.0f) texCoordT.x -= (float)((int)(texCoordT.x));
315+
if (texCoordT.y < 0.0f || texCoordT.x > 1.0f) texCoordT.y -= (float)((int)(texCoordT.y));
316+
314317
int pixelX = (int)(fw*texCoordT.x - 0.5f);
315318
int pixelY = (int)(fh*texCoordT.y - 0.5f);
316319

@@ -320,8 +323,8 @@ static inline float evalMap2DPdf(const float2 texCoordT, __global const float* i
320323
if (pixelX < 0) pixelX += sizeX;
321324
if (pixelY < 0) pixelY += sizeY;
322325

323-
if (pixelX < 0 || pixelY < 0)
324-
return 1.0f;
326+
//if (pixelX < 0 || pixelY < 0)
327+
//return 1.0f;
325328

326329
const int pixelOffset = pixelY*sizeX + pixelX;
327330
const int maxSize = sizeX*sizeY;

0 commit comments

Comments
 (0)
Please sign in to comment.