Struggling with low frames per second when using antialiasing in a Threejs environment

Enabling antialias on the WebGL renderer causes a significant drop in FPS, going from 60 down to about 25.

this.renderer = new THREE.WebGLRenderer({
    antialias: true
});

This issue seemed to arise after I introduced multiple scenes and had to manually clear the depth. Interestingly, I still achieved 60 FPS on mobile Safari without any problems, but not on desktop or Chrome.

What could be causing this discrepancy in performance?

Answer №1

One possible factor to consider is the resolution of your desktop scene.

It's also important to verify the device pixel ratio.

Answer №2

The solution provided by mjanisz1 seems to be on point, as it relates to the combination of your resolution and dpr. Many browsers utilize MSAA, which involves upscaling rendering and can be resource-intensive. I recommend exploring FXAA at this link https://github.com/mattdesl/three-shader-fxaa. It offers a good balance between quality and performance that is generally beneficial.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

How can I use MongoDB updateOne to retrieve the newest document instead of the oldest one?

Apologies for the elementary question, but I am determined to make this code function properly. When using the .updateOne() function in node.js to update my mongo database, I leave the parameters blank thinking it would update the most recently added docu ...

Unable to get Mongoose's Required field to work in conjunction with Enum validation

Encountering issues with Mongoose Required true and Enum validation when using updateone await MonthlyTarget.updateOne({website: req.body.website, year: req.body.year, month: req.body.month}, req.body, {upsert: true}); Model 'use strict'; import ...

Enhancing PHP function speed through pre-compilation with Ajax

I am curious about compiling server side functions in PHP with Ajax, specifically when multiple asynchronous calls are made to the same server side script. Let's consider a PHP script called "msg.php": <?php function msg(){ $list1 = "hello world ...

Looking to send a user elsewhere if there are no errors present in the javascript errors tag

Looking for a way to redirect users to another page if the #errors are empty. Any advice on how to achieve this successfully? I attempted using an if statement but it didn't work out as expected. $(document).ready(function(){ $( ...

Testing for connected components with a specific property (React/Redux)

Having a React component with Redux @connect decorator, a situation arises like this: import React, { Component } from 'react' import { connect } from 'react-redux' @connect(mapStateToProps, { onPress: () => {...code}) // The ...

Issue encountered while attempting to deactivate certain foundation CSS and JavaScript files

I am attempting to deactivate certain CSS files in the foundation framework, as they are unnecessary for my project. After installing foundation via a gem, I followed Ryan Bates' recommendation to modify the foundation_and_overrides.scss file by repl ...

Exploring ways to query a mapped array in React Native

Struggling to search a mapped list in react native? While using a Flatlist would be easier, this task is currently causing me major frustration. If anyone has any insights or solutions, please share them! Here's a snippet of the code: import React ...

Interacting with dynamically created input fields using Jquery from a JSON loop

I'm stuck trying to figure out why this code isn't working for me. I'm attempting to retrieve the value of a textfield that was generated via a loop from a JSON file. At the end of this code, I've added a simple click(function() {alert ...

Error: Unable to call topFrame.window.changeSelectedBarStyle because it is not a valid function. What could be causing this

This function is called changeSelectedBarStyle: function changeSelectedBarStyle(tdId){ $("#menuTable td").each(function(index){ if(this.id == tdId){ $(this).removeClass("menuPanel"); $(this).addClass("menuPanelSelected" ...

Utilize jQuery to toggle classes on multiple elements in web development

I've been struggling to streamline this code I created for the website's navigation. As a novice in Javascript and jQuery, I would appreciate any help or advice. Thank you! Since the page doesn't reload, I have implemented the following met ...

Enhance User Interaction by Making HTML Elements Clickable on Top of Three.js Render

I'm currently working on an animation project using Three.js that involves moving objects. In this animation, I've created a text bubble that appears when an object is clicked, along with an "X" button to close it. However, I'm facing an iss ...

Javascript class for creating random quotes

I am utilizing the JavaScript fetch API to display a random quote. The quote changes upon page load, however, I encounter a type error when clicking on the new quote button. Error message: TypeError: Cannot read properties of undefined (reading 'len ...

Using ng-bind-html does not offer protection against cross-site scripting vulnerabilities

I utilized ng-bind-html to safeguard against cross site scripting vulnerabilities. I came across information about sanitization and engaged in a discussion at one forum as well as another informative discussion. However, I encountered an issue where it di ...

Enhance pagination and column filtering in JQGrid without relying on local data (loadonce = false)

I'm currently facing an issue with my web application development. I am utilizing Laravel 5.8 for the backend and JQGrid version 4.6.0 to create grids. One of the grids I have is constructed with a dynamic URL that fetches JSON data from the server b ...

Algorithm for encryption and decryption using symmetric keys

Can anyone recommend a reliable symmetric-key encryption algorithm that works seamlessly with both JavaScript and Java programming languages? I attempted to implement one myself, but encountered some complications related to encoding. ...

Executing Java Script on several identical elements

Currently, I am facing an issue with my JavaScript function that is supposed to toggle the display of titles within elements. The function works perfectly fine on the first element, but it does not work on the other elements. Here is the code snippet: ...

regarding unfamiliar functions in code and their mysterious purposes

My journey learning Vue.js has been going well, but I've hit a roadblock. Can someone explain the meaning of _. in the following code snippet? ...

Unlocking the Power of Ajax for Displaying Wordpress Queries

Running into some issues trying to use jQuery for displaying content. I have set up three buttons that, when clicked, load data from a php file on my server. Everything functions properly except when attempting to retrieve Wordpress posts. An error message ...

Issue detected: Props that are of type Object/Array must utilize a factory function in order to provide the default value

I recently started using Vue-Cli3.0 and came across this interesting module for Vue.js called https://github.com/holiber/sl-vue-tree It's a customizable draggable tree component for Vue.js, but I encountered an issue where it couldn't copy funct ...

Tips for programmatically inserting an identifier attribute within an array of objects?

Within a simple section, I have implemented a feature where users can input movie details using a form. The values entered by the users are used to create objects, which are then pushed into an array. However, I am looking to assign a unique and dynamic ID ...