Hello Guest

It seems like my rendering is wrong but im not sure why

  • 2 Replies
  • 241 Views
It seems like my rendering is wrong but im not sure why
« on: September 20, 2020, 15:15:33 »
Camera:https://pastebin.com/Vb1xFir6
Main:https://pastebin.com/wMchBSbV
shaders:https://pastebin.com/UmQyRFNs

The problem is that i should see a model of a dragon befor i added the camera that worked about fine.
now i can only see some white pixels that disapear really fast even when i keep setting the position of the camera to 0 -3 0
this means that something is wrong with my rendering.
I would appreciate some help

*

Offline KaiHH

  • ****
  • 288
Re: It seems like my rendering is wrong but im not sure why
« Reply #1 on: September 20, 2020, 15:32:38 »
Read this: https://github.com/JOML-CI/JOML/wiki/Common-Pitfalls#angles-are-always-in-radians

Currently, you are passing 90 radians to Matrix4f.perspective()

Re: It seems like my rendering is wrong but im not sure why
« Reply #2 on: September 20, 2020, 16:41:27 »
Read this: https://github.com/JOML-CI/JOML/wiki/Common-Pitfalls#angles-are-always-in-radians

Currently, you are passing 90 radians to Matrix4f.perspective()

made these getters and replaced camera.Zoom with camera.getZoom
i also replaced other things where necessary which is really only this:
Code: [Select]
front.x = (Math.cos(getYaw()) * Math.cos(getPitch()));
front.y = Math.sin(getPitch());
front.z = (Math.sin(getYaw()) * Math.cos(getPitch()));

It was an improvement of the white pixels being shown roughly 3 seconds instead of 1
video:https://drive.google.com/file/d/1xMTHa97qqNcODF4NdxA5TgCmpp7jMYSi/view?usp=sharing
so that wasnt the entire solution
« Last Edit: September 20, 2020, 17:20:12 by coolian »