Jump to content

change resolution,antialias or lighting quality in lua ?


norbert
 Share

Recommended Posts

There is a default script file called App.lua in your project. You can change the resolution and window settings at where you create it. Looks like below;

 

self.window = Window:Create(self.title, 0, 0, 640, 480, Window.Titlebar)

 

You can set the AA on context creation

 

self.context=Context:Create(self.window, 0) -- Second parameter determines the MSAA count. Check it out on the documents

 

The other quality settings are changed through the editor options.

Link to comment
Share on other sites

The context parameter is the old way of setting AA, on the context itself. This is bad. The proper way to do it is with the Camera::SetMultisampleMode() command. This will make it so the camera renders to a gbuffer with multisampled textures, one of the new features in OpenGL 4.

 

Context antialias could still be useful for 2D drawing but you generally do not need it for anything.

 

 

Link to comment
Share on other sites

The context parameter is the old way of setting AA, on the context itself. This is bad. The proper way to do it is with the Camera::SetMultisampleMode() command. This will make it so the camera renders to a gbuffer with multisampled textures, one of the new features in OpenGL 4.

 

Context antialias could still be useful for 2D drawing but you generally do not need it for anything.

 

I have everything turned up to high in the editor and my shadows still have artifacts

Link to comment
Share on other sites

The context parameter is the old way of setting AA, on the context itself. This is bad. The proper way to do it is with the Camera::SetMultisampleMode() command. This will make it so the camera renders to a gbuffer with multisampled textures, one of the new features in OpenGL 4.

 

Context antialias could still be useful for 2D drawing but you generally do not need it for anything.

 

I can't seem to get this command to work in LUA at the moment. Am I doing it right? The section of code I'm using is below, but it causes a crash with "attempt to call method 'SetMultisampleMode' (a nil value)":

 

--Create a camera
self.camera = Camera:Create()

--Set the camera's MSAA mode
self.camera:SetMultisampleMode(4)

 

EDIT: Woah, the "code" formatting option didn't like that.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...