Comments (6)
The values coming out of the PNG
are expressed in float-point numbers which will be 0 to 1. When storing them as UINT or SINT, it's going to result in 0 or 1. If you want the values to range for all the supported integers, that is what UNORM and SNORM do.
from directxtex.
So in this case, it sounds like an issue with PNGs storing data as floats. Is there an input format that works better for this conversion?
from directxtex.
All image processing in DirectXTex is done with floating-point to take advantage of SIMD operations.
What is it you expect to happen converting a classic 8-bit UNORM image to a 32-bit UINT image?
from directxtex.
I just expected the end result to be similar to UNORM/SNORM conversions, considering the documentation on Microsoft states the underlying storage format for UNORM/UINT are identical (unsigned integer). And since texconv converted without throwing an error, I was confused why end results varied so much. It was a misunderstanding on my part.
I'm using texconv to generate test data for a project I'm working on using a random png I found online. Now I'm just wondering what would be a better source format to use for generating a valid UINT/SINT image.
from directxtex.
There are special conversion cases for doing to/from UNORM/SNORM formats which are not applied to UINT/SINT. This in large part because UINT/SINT doesn't have any specific meaning in textures: it's just a raw format used by compute shaders.
I'm open to adding some special conversion here, but it's not clear to me what is the logical behavior.
from directxtex.
I don't have any ideas for conversions, as I'm not familiar with UINT/SINT in standard use cases. But now I have a better understanding of how texconv sees those formats (doesn't do any conversion).
I'm fine with closing the issue as my questions have been answered.
from directxtex.
Related Issues (20)
- -flist keep structure HOT 1
- Integrate Xbox functionality in the Auxiliary folder
- FAILED (80004005: Unspecified error ) HOT 2
- Move PPM/PFM I/O functions to the library HOT 1
- WIC loading is different from D3DX loading of WIC textures HOT 9
- GPU-compressed `BC7_UNORM_SRGB` textures contain red streaks when using texconv.exe under wine HOT 1
- (Question) Converting BC4 to BMP with texconv HOT 1
- Does DirectXTex directly depend on ZLIB? HOT 3
- Can't compile ddsdump HOT 2
- gcc Warnings in Linux -Wstringop-overflow HOT 4
- Does DirectX support direct reading of compressed textures? HOT 1
- Use fixed width integers for underlying enum types HOT 1
- I need pre-compiled shaders HOT 3
- Allow user to convert single lat-long hdri into cubemap HOT 1
- Low quality DXT compression HOT 4
- Add function to convert a texture to Standard Swizzle and vice versa HOT 1
- D3DFMT_X8L8V8U8 support (BumpDuDv/BumpLuminance) HOT 5
- keep getting acess denied HOT 3
- Compression artifacts for BC7_UNORM when compressing on CPU (GPU is fine) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from directxtex.