Did a search and found a somewhat vague answer
and i fear i already know the answer but ......
is there anyway to retrieve pixel information from a loaded image, for a pixel shader, normal map combo
thanks, if not any tips for getting lighting to work
Per-Pixel Graphics (Retrieve Pixel Data from Image) Shader
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Per-Pixel Graphics (Retrieve Pixel Data from Image) Shad
You can get a screenshot with love.graphics:getScreenshot() or something along those lines. Problem is that it's HORRIBLY laggy. You can use MapPixel on individual sprites, but there is not real access to the drawbuffer ;-;
- kikito
- Inner party member
- Posts: 3153
- Joined: Sat Oct 03, 2009 5:22 pm
- Location: Madrid, Spain
- Contact:
Re: Per-Pixel Graphics (Retrieve Pixel Data from Image) Shad
Mmm...
It seems to me that you can't really do them right now unless you use an external library.
(forum search is awesome)
It seems to me that you can't really do them right now unless you use an external library.
(forum search is awesome)
When I write def I mean function.
Re: Per-Pixel Graphics (Retrieve Pixel Data from Image) Shad
Thanks for all the replys, i also got a pm from rhezalouis who told me to use ImageData (Duh)
anyway i never though of searching for shaders, i mustn't have searched all the forums
anyway ive got phong lighting working at the amazing speed of 2 fps (131,072 sqrt's per frame) (Could be used as dynamic but not realtime, if you get me)
very very basic implementation, with no attempt of optimisation
http://dl.dropbox.com/u/926983/Lighting.love
(Ill be updating it, so best use dropbox instead of forum)
It is based on this website
http://29a.ch/2010/3/24/normal-mapping- ... canvas-tag
The Face image is also in the zipped .love file, just rename it (Remove first character 'F')
Also change the material settings, you can get some real nice looks
Ambient,Specularity,Shiny
I have several ideas on optimising, and making the effect a bit better
Thanks for the help, and im reading Shaders and FBOs, so hopefully things get alot better
anyway i never though of searching for shaders, i mustn't have searched all the forums
anyway ive got phong lighting working at the amazing speed of 2 fps (131,072 sqrt's per frame) (Could be used as dynamic but not realtime, if you get me)
very very basic implementation, with no attempt of optimisation
http://dl.dropbox.com/u/926983/Lighting.love
(Ill be updating it, so best use dropbox instead of forum)
It is based on this website
http://29a.ch/2010/3/24/normal-mapping- ... canvas-tag
The Face image is also in the zipped .love file, just rename it (Remove first character 'F')
Also change the material settings, you can get some real nice looks
Ambient,Specularity,Shiny
I have several ideas on optimising, and making the effect a bit better
Thanks for the help, and im reading Shaders and FBOs, so hopefully things get alot better
Last edited by McP on Sun Aug 22, 2010 8:59 pm, edited 1 time in total.
- Felipe Budinich
- Citizen
- Posts: 67
- Joined: Thu Jul 29, 2010 1:36 pm
Re: Per-Pixel Graphics (Retrieve Pixel Data from Image) Shad
Wow this is amazing mate. Just a "little" slow, but amazing!
Who is online
Users browsing this forum: No registered users and 2 guests