소스 검색

Review issue with HDR pixels loading

pull/969/head
raysan5 5 년 전
부모
커밋
112874fe07
1개의 변경된 파일3개의 추가작업 그리고 6개의 파일을 삭제
  1. +3
    -6
      src/textures.c

+ 3
- 6
src/textures.c 파일 보기

@ -253,13 +253,10 @@ Image LoadImage(const char *fileName)
FILE *imFile = fopen(fileName, "rb");
stbi_set_flip_vertically_on_load(true);
// Load 32 bit per channel floats data
//stbi_set_flip_vertically_on_load(true);
image.data = stbi_loadf_from_file(imFile, &image.width, &image.height, &imgBpp, 0);
stbi_set_flip_vertically_on_load(false);
fclose(imFile);
image.mipmaps = 1;
@ -551,7 +548,7 @@ Color *GetImageData(Image image)
pixels[i].a = 255;
k += 3;
}
} break;
case UNCOMPRESSED_R32G32B32A32:
{
pixels[i].r = (unsigned char)(((float *)image.data)[k]*255.0f);
@ -560,7 +557,7 @@ Color *GetImageData(Image image)
pixels[i].a = (unsigned char)(((float *)image.data)[k]*255.0f);
k += 4;
}
} break;
default: break;
}
}

불러오는 중...
취소
저장