Hey everyone, apologies for resurrecting an ancient thread, but I can't quite figure out how to add Color to this. I've got quite a bit of coding/scripting experience, but nothing directly in Shaders like this. I've added a color variable in the shader, which is showing up in the Unity editor now, but I can't figure out…
Jerry, CrazyButcher, Xoliul! Thank you! Jerry, I just realized I never replied to this so I wanted to make sure you knew how much I appreciated you helping me out with this. Your code conversion has been a great help in understanding the differences in Cg code, thank you for taking the time to do this. :)
Ah stumbled upon answer - didn't know you could just multiply colors together. I guess because its just white (1) times the RGB values of whatever you set in the Editor. float4 ret = float4(1, result); ret = ret*_Color;
return ret;
Updated the package with circle dots: Download Converting to Unity wasn't that bad, it can have blocks of CG code inside the shader files so it's pretty straightforward. I just had to look up how to get the worldnormal and worldpos and added the parameters for the inspector etc.
yeah i know, i didn't really bother making them circles, because I though they'd be so small you wouldn't notice. Like I said, it's all a bit sloppy but it showed the point. I tried CrazyButcher's edit and it's not working 100%, it needs an extra abs() thrown in, so the correct code for dots would be : This is fun :) Oh…
float zgrid = length(grid.xy - 0.5 * scale);float xgrid = length(grid.yz - 0.5 * scale);float ygrid = length(grid.xz - 0.5 * scale); should give you points, fmod basically chops values into segments each of the length [0,scale], the grid coordinates. Think of tiles, every tile has a local x,y axis. points within a tile go…
Hi Polycount! Long time lurker here, first time posting. I finally landed my first job in the game industry about 8 months ago(!!!) as a 3D artist, it's been awesome and I really owe this community a big thanks for all the wisdom, laughs and inspiration it has given me over the years. So, thank you Polycounters! But I've…
3d texture? using masked opacity? UDK comes with shader functions that describe projecting 3d textures if you want to see an implementation. You could project the same repeating dotted texture along each axis and have them add together and clamp to represent where all intersect or something (idk just a thought). edit:…
I put a little more effort in this, now it works by actually projecting points onto a surface (based on the normal), so it works with eveyrthing. Need to pass in the world normal obviously. It's still a bit sloppy where for curved objects the scale and point size isn't uniform, that just comes down to using something more…