SFML community forums
Help => Graphics => Topic started by: pixartist on January 05, 2014, 01:22:54 pm
-
Hi, I need to create a texture with a 64-bit color depth (or at least 32 bit). Is that possible? If so, how?
-
32 bit is the default. 64 bit is not possible with SFML, you need to use OpenGL directly.
-
But this is one of the most important features of modern hardware. How can this not be supported ?
(PS: I meant per channel)
-
But this is one of the most important features of modern hardware.
64 bit textures? I doubt it.
(PS: I meant per channel)
What games exactly need 64 bits to represent a single color? :o
-
May I ask what you want to achive with that much colors? Are current operating systems even capable of displaying 64bit colors?
-
Well, I consider Deferred rendering and HDR pretty important.
-
Well, I consider Deferred rendering and HDR pretty important.
I wanna use it for calculating heightmap erosion. Otherwise I'd have to use a double array and manually convert it to a texture every frame...
-
But this is one of the most important features of modern hardware.
64 bit textures? I doubt it.
(PS: I meant per channel)
What games exactly need 64 bits to represent a single color? :o
I for once used it to create a Game-Of-Life shader system... Textures are not only used for displaying images anymore. They are a convenient way of carrying 2D-data.
-
Not even OpenGL supports textures with 64 bits per channel (source (http://www.opengl.org/wiki/Image_Format)). Are you sure you're not confusing something?
-
I'm pretty sure XNA supported 256 bit textures (at LEAST 128 bit though)
Edit: 32bit per channel is max: http://msdn.microsoft.com/en-us/library/microsoft.xna.framework.graphics.surfaceformat.aspx
see: Vector4
-
Are you sure they don't just gather multiple components to one? After all, you won't even find a built-in 128 bit integral type in programming languages.
Anyway, SFML doesn't support it :)
-
Are you sure they don't just gather multiple components to one? After all, you won't even find a built-in 128 bit integral type in programming languages.
Anyway, SFML doesn't support it :)
No, it really works. It's useful for shaders that contain more detailed information. Also it's 128 bits for all channels together. Each channel is a 32 bit float. I don't know the exact technical solution though.
Too bad I can't find any posts on how to change the surface format in sfml manually and if sfml can even work with modified renderTextures.
-
I know that it works, I have used 32 bit integral textures for a geometric meshing application. But other texture formats are currently not supported by SFML, and I don't think they will be in the near future, since it's a rather advanced feature that only few people require for 2D rendering.
As stated, you should try to use OpenGL directly (or emulate the functionality somehow with smaller texture formats). You can use OpenGL on top of SFML, so you don't need to rewrite everything.
-
Hmm, SFML does not know the GL_RGBA32F enum :(
-
Yes, as I said "other texture formats are currently not supported by SFML". So, "you should try to use OpenGL directly" ;)
-
Edit: Is it possible to draw an opengl texture using sfml (to the sfml quad) ?
-
Edit: Is it possible to draw an opengl texture using sfml (to the sfml quad) ?
Since SFML can't handle texture formats other than GL_RGBA8, no.
You should have a look at the tutorials, documentation and examples to see how OpenGL and SFML interact. It's actually not that difficult to achieve, but of course you have to know the basics of OpenGL.