Tag Info

New answers tagged

1

Yes! This is exactly the sort of thing that can be done very well on the GPU, since it is processing one pixel at a time. There's two ways you might address this: Incorporate this processing directly in your shader, so you don't need to preprocess the texture at all. just process it on the fly as you apply it. To do this, you'd incorporate your ...


0

I'm doing it using the following code: BufferRef LoadImage(std::string filename, bool &success) { SDL_Surface *surf = IMG_Load(filename.c_str()); if (!surf) { success = false; std::cout << "Cannot load " << filename << std::endl; BufferRef r; return r; } SDL_PixelFormat format; format.palette = 0; ...



Top 50 recent answers are included