Jump to content

Post Process Shaders (shadmar)


Guppy
 Share

Recommended Posts

(the ones from the work shop)

 

How are they supposed to work?

 

Here is what I've tried;

 

Modified the FPScontroler script to take an optional external camera, IMO this should be part of the default script. I also added

self.camera:SetKeyValue("skybox_texture","Materials/Sky/skybox_texture.tex")
self.camera:SetKeyValue("skybox_intensity","1.0")

 

 

 

On said camera I've tried plugging in each of the scripts in turn to no avail - in fact when saving the map and reloading the camera has no scripts attached.

 

I've tried to open the script in the editor to try and find a hint of how to use it, but I cannot - guess it's some sort of content protection scheme kicking in there.

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

Link to comment
Share on other sites

No need to mod the FPScontroller script.

 

Add a pivot to your scene and attach a simple controlscript like this in Script:Start() to locate any camera (also the one created in the FPSPlayer)

 

local world=World:GetCurrent()
for i=0,world:CountEntities()-1 do
 if world:GetEntity(i):GetClass()==Object.CameraClass then
	 self.camera=world:GetEntity(i)
	 tolua.cast(self.camera,"Camera")
	 break
 end
end

if self.camera then
  self.camera:SetKeyValue....
  ...
end

HP Omen - 16GB - i7 - Nvidia GTX 1060 6GB

Link to comment
Share on other sites

That certainly works - I just find it more intuitive to have the camera as a separate entity so I can adjust FoV and what not independent of the fps script :)

 

One thing you didn't answer is how do I turn on for instance the sky box?

 

I may be missing something blatantly obvious

System:

Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k

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...