Jump to content

Shader transition linked with entity?


Recommended Posts

Hello.

 

I have a shader that periodically appears that a light goes off and on.

I would like to tie a light entity to it so that the light entity turns on at the same time the shader transitions.

 

However, as far as I've experimented it seems that timing for shaders and game entities run differently, they become out of sync.

 

So is there any way to directly connect the entity to the shader so that the light acts when the shader changes?

Link to comment

Yeah this would basically be easier done by scripting the transitions rather than using shader animations. You can toggle a light entity, while toggling the appearance/disappearance of the geometry that should show up based on the state of the light. I think the entity to use for the brushwork is func_wall, but it's been a while.

Link to comment

The reason I wanted to use the shader's timing is because I wanted the lights to turn on at the same time my day and night cycle runs.

Entities seem to run out of sync from shaders even though they both start at the same time, but

 

I guess an alternative is to drop my idea of automatic on/off and rather have them func_usable with anim stages and button instead.

I'll try it out

Link to comment

Using light styles on light entities should stay in-sync with shaders, but these are limited to the preset styles that the game gives you. (These have a maximum phase of 1.6 seconds)

 

So light styles would be an option if your entire day/night cycle was done in 1.6 seconds :winkthumb:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...