Skip to content

Commit

Permalink
convert 24 bit depth to 32 bit depth textures
Browse files Browse the repository at this point in the history
  • Loading branch information
dluisnothere committed Oct 6, 2022
1 parent f2f75a5 commit 1d69689
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Binary file removed objs/textures/wahoo.bmp
Binary file not shown.
8 changes: 4 additions & 4 deletions scenes/textureBox.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ EMITTANCE 0

// Box texture
TEXTURE 0
PATH ../Project3-CUDA-Path-Tracer/objs/textures/ore.png
PATH ../Project3-CUDA-Path-Tracer/objs/textures/wahooRotatedFlipped.png

// Camera
CAMERA
Expand Down Expand Up @@ -104,9 +104,9 @@ SCALE .01 10 10

// texture obj
OBJECT 6
../Project3-CUDA-Path-Tracer/objs/box.obj
../Project3-CUDA-Path-Tracer/objs/wahoo.obj
material 1
TRANS 0 2 0
ROTAT 0 0 0
SCALE 3 3 3
ROTAT -45 0 0
SCALE 1 1 1
TEXTURE 0
1 change: 1 addition & 0 deletions src/scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ int Scene::loadTexture(string textureid) {

//pixelData = new glm::vec3[width * height];
pixelData = new unsigned char[width * height * channels * sizeof(unsigned char)];
//pixelData = new unsigned char[width * height * 4 * sizeof(unsigned char)]

// ... process data if not NULL ..
if (data != nullptr && width > 0 && height > 0)
Expand Down

0 comments on commit 1d69689

Please sign in to comment.