Logo by kr0mat1k - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Visit the official fractalforums.com Youtube Channel
 
*
Welcome, Guest. Please login or register. April 19, 2024, 01:28:47 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: [1]   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: How to properly map a 2D map for tile rendering?  (Read 821 times)
0 Members and 1 Guest are viewing this topic.
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« on: August 03, 2015, 01:22:15 AM »

Hey,

Probably that's simple, but can't seem to get it right.
I am loading a flat background image into a sampler2D.
The texture should serve as a background so it should be 2D mapped onto entire buffer.
I am using the following code:

Code:
vec3 bg = texture2D(gl_FragCoord.xy * PixelScale).xyz;

It renders properly in the main buffer and in highres rendering it renders fine if doing 1x1 tile.
But when there's more tiles involved, apparently background texture coordinate seem to restart every tile.
How should I be doing that properly?




* Tile_BG_issue.jpg (114.02 KB, 1280x720 - viewed 187 times.)

* OK.00054.jpg (65.38 KB, 1280x720 - viewed 221 times.)
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #1 on: August 04, 2015, 03:46:25 PM »

Anyone?
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
_revers_
Conqueror
*******
Posts: 138



« Reply #2 on: August 04, 2015, 04:33:47 PM »

Try using:
Code:
varying vec2 coord;
varying vec2 viewCoord;
varying vec2 viewCoord2;
from 3D.frag, i.e.:

Code:
vec3 bg = texture2D(Texture, coord).xyz;
vec3 bg = texture2D(Texture, viewCoord).xyz;
vec3 bg = texture2D(Texture, viewCoord2).xyz;

One of them should work.
Logged
Patryk Kizny
Global Moderator
Fractal Fertilizer
******
Posts: 372



kizny
WWW
« Reply #3 on: August 04, 2015, 08:51:28 PM »

vec2 pos = (viewCoord2+vec2(1.0))*0.5;

That's what worked for both main buffer and tile based rendering.
Huge thanks!
Logged

Visual Artist, Director & Cinematographer specialized in emerging imaging techniques.
Pages: [1]   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
installed apo 2.07 beta and it does not work properly Help & Support The_Mazzatello 1 978 Last post October 16, 2008, 10:14:36 PM
by wolfepaw
Mandelbulb spin and properly looping video? Videos twinbee 3 11296 Last post December 19, 2009, 07:52:20 PM
by David Makin
Mandelbulber 1.10 - tile rendering Releases Buddhi 1 2358 Last post January 02, 2012, 10:46:50 PM
by isosceles
Mandelbulb 3D and Apophysis Not Loading Properly Help & Support imakeart 4 427 Last post June 10, 2013, 01:27:52 PM
by cKleinhuis
Help rendering a seamless/tile-able 2D fractal noise? Help & Support IndyE 2 357 Last post November 11, 2015, 09:26:33 PM
by IndyE

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.127 seconds with 25 queries. (Pretty URLs adds 0.006s, 2q)