codeanticode / planetarium

A Processing library for dome projection.
http://processing.andrescolubri.net/libraries/planetarium/
Other
49 stars 14 forks source link

WishList Pranetarium #11

Open janebeta7 opened 5 years ago

janebeta7 commented 5 years ago

Hello All I Open a WishList for planetarium:

feel free to contribute! Alba

janebeta7 commented 4 years ago

Wishlist planetarium > CILINDRICAL SHAPE

Not only planetarium deforms, CIlindrical deforms too, its a diferent shader but works so similar img

cilindrical.glsl

uniform samplerCube cubemap;

uniform float aperture;

varying vec4 vertTexCoord;

const float PI = 3.1415926535897932384626433832795;
const float DEG_TO_RAD = PI/180;

void main() {
  vec2 thetaphi = ((vertTexCoord.xy * 2.0) - vec2(1.0)) * vec2(PI, PI/2);

  vec3 rayDirection = vec3(cos(thetaphi.x), tan(aperture* DEG_TO_RAD)*thetaphi.y, sin(thetaphi.x));

  vec3 color = vec3(textureCube(cubemap, rayDirection));

  gl_FragColor = vec4(color, 1.0);
}
janebeta7 commented 4 years ago

Get pgr PGraphics to send to spout or Syphon

its more effective in terms of fps to send PGraphics to Spout instead windows screen spoutSend.sendTexture(pg); then we need to get de pg cubemap PGraphics for example PGraphics dc.getPgr()

janebeta7 commented 4 years ago

Create an example with screen() functioon to explain that is there where you have to write your code to export png sequences.

https://github.com/codeanticode/planetarium/issues/8