|
|
#1 |
|
Junior Member
Join Date: Feb 2008
Posts: 3
|
Using textures?
Could anyone tell me how to load, and move a texture?
I put the file into the textures map, and it's called Billy.jpg. Also, how can i move it around? Thanks in advance! |
|
|
|
|
|
#2 |
|
wellspring of milk
Major Dude |
hey, have a look into the manual
![]() code: this is the way to load and display your texture (stretched). if you multiply the uv vector by texsize.xy*texsize_billy.zw code: your texture should be scaled to its original size. now just add a float2(offsetx,offsety) to move it around. Moreover you can pass these values via the q1-q32 variables from the per-frame code to the shader. code: (with q1 = offset_x and q2 = offset_y in the per-frame code) and as a little homework... go figure out the difference between sampler_fc_billy, sampler_fw_billy, sampler_pc_billy & sampler_pw_billy ![]() (do you incidentally try kidding me? - the examples in the preset authoring guide are not just by accident also with "billy" or what?) Go Home! | get your stuff done | Global Change 2009 | WebGL Playground | OpenProcessing | studio sketchpad | Twitter @ Google+ @ Facebook Last edited by Flexi; 18th February 2008 at 00:08. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2008
Posts: 3
|
yeah, i was trying to use the manual, but i didn't really understand it :P
The texture still doesn't seem to show up. This is what i've got now. code: |
|
|
|
|
|
#4 |
|
wellspring of milk
Major Dude |
...
code: the ret expressions were ment to be replaced. |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Feb 2008
Posts: 3
|
Could you maybe point me to an example of a preset that uses textures?
Thanks! |
|
|
|
|
|
#6 |
|
wellspring of milk
Major Dude |
|
|
|
|
|
|
#7 |
|
Major Dude
|
My "Age of Science" posted early uses moving textures, as do "My World" and "Blue Jewel" presets, for further examples
------------- What do you wish for? --Instrumentality |
|
|
|
|
|
#8 |
|
Junior Member
Join Date: Mar 2008
Posts: 1
|
I think what he means is using a texture much like a sprite.
I do not believe that textures can be manipulated beyond stretching/tiling. What you are looking for is more along the lines of sprites. In which case, sprites are separate from the MilkDrop presets. As far as i know, you cannot have a preset project a single image across the screen. Unless some very clever code has been developed without me knowing. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|