Eyeon Talk:Script/Reference/Applications/Fuse/Classes/FuPixel

From VFXPedia

Jump to: navigation, search

It would be really cool if we could access other image channels with FuPixel. So we could make a viewshader that showed the channels, or maybe even something like a Fog or Blinn VS. --Chad 12:38, 1 September 2011 (EDT)

- A viewshader only has access to the data/channels that have been uploaded into a texture. FuPixel can't give you access to channels that the texture doesn't have. Stuart 02:07, 2 September 2011 (EDT)
- Yeah, I was thinking more as a feature request, but I guess the issue is that we'd need the lua side of the viewshader to define what gets sent to the fragment shader, like what we would do with an OpenCL fuse. That's probably easier than the other problem, which is that the viewshader would need to be able to make requests, as opposed to just streaming through the data already being sent to the viewer. Unfortunately sometimes you just need more than 4 channels of data, :( Oh well. --Chad 09:42, 2 September 2011 (EDT)
Holy Crap! You can make 3D ViewShader Macros. This is interesting... --Chad 18:29, 7 September 2011 (EDT)

TexCoords

I'm having trouble understanding TexCoord1... so, apparently TexCoord0 really is pixels from 0 to width/height excluded, so the topmost row of pixels has a TexCoord0.y of height-1. For TexCoord1.y it seems that the maximum value of 1.0 is part of the image though. Something like

if (f.TexCoord1.y >= 1.0f) f.Color.r = 1.0f;

will actually color the topmost scanline. And

if(f. TexCoord1.y > 0.5f) f.Color.r = 1.0f;

will turn half a pixel more than the top half of the image red. Is this to be expected?